Comments (5)
按照 暴力猴的文档 https://violentmonkey.github.io/api/metadata-block/#inject-into 添加了
// @inject-into content
可以尝试重新安装下脚本 https://lab.magiconch.com/nbnhhsh/nbnhhsh.user.js 确认问题有没有解决
from nbnhhsh.
装了暴力猴试了一下确实重现了这个问题,导致这个问题的原因是因为 暴力猴没有对 @require 的脚本注册的变量做作用域限定
最小问题重现是这样。
// ==UserScript==
// @name New script - bilibili.com
// @namespace Violentmonkey Scripts
// @match https://www.bilibili.com/video/BV1nW4y1V7kR/
// @grant none
// @version 1.0
// @require https://lab.magiconch.com/vue.2.6.11.min.js
// ==/UserScript==
实测我甚至只要写个这样的脚本就能干掉所有需要全局调用 Vue 变量的网站
// ==UserScript==
// @name New script - bilibili.com
// @namespace Violentmonkey Scripts
// @match https://www.bilibili.com/video/BV1nW4y1V7kR/
// @grant none
// @version 1.0
// @author -
// @description 2023/1/10 22:50:57
// ==/UserScript==
window.Vue = 1;
想要解决这个问题可能需要调整脚本的 Vue 引入方式,当前脚本被引用的地方有写多,我要考虑下怎么调整。
临时解决方案,可以选关闭本脚本、使用线上网站,或者建议使用 Tampermonkey 对用户脚本进行管理
from nbnhhsh.
浏览器:Microsoft Edge 版本 108.0.1462.76
脚本管理器:暴力猴 版本2.13.7
遇到一样的问题
from nbnhhsh.
cool,解决了
from nbnhhsh.
https://microsoftedge.microsoft.com/addons/detail/scriptcat/liilgpjgabokdklappibcjfablkpcekh
使用ScriptCat,也复现了这个问题
from nbnhhsh.
Related Issues (20)
- Bug HOT 2
- 是否考虑对于特殊符号的支持
- 借助语言模型「翻译」而不仅限于「查词」 HOT 1
- 建议添加词条关联
- 建议在访问独立网页版本时自动激活输入框
- 大陆阿里云服务器丢包严重 HOT 2
- 可否添加一些汉字简称功能?比如“二观=国产二次元手游观察”,如果实装困难加这一个就行 HOT 1
- 关于"OP"一词 HOT 1
- 选中单个字母或数字时会返回上次查询结果
- 做一个不能好好说话;反向转意把词语翻译成缩写 HOT 2
- 关于提示 包含不安全内容、被多人举报,以停止访问该网页 HOT 4
- API 是否开放呢 HOT 2
- 为什么被腾讯QQ以及微信提示包含不安全内容、被多人举报,以停止访问该网页? HOT 1
- 我觉得这个脚本可以进化了 HOT 1
- 建议修改描述 HOT 1
- 请求添加NGA论坛 HOT 2
- 完善一些 Github 缩写 HOT 3
- 网站寄了?
- 选中输入框文字时翻译弹层显示位置错误 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nbnhhsh.