Replies: 6 comments 19 replies
-
Do you have any opinion on the differences? When |
Beta Was this translation helpful? Give feedback.
-
In my understanding, user scripts should run in their own sandbox and can access data outside the sandbox through unsafeWindow Script with nothing// ==UserScript==
// @name debug
// @namespace debug
// @version 0.0.1
// @description debug
// @author debug
// @match https://*/*
// @match http://*/*
// @require https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.slim.min.js
// ==/UserScript==
window.debug="window";
console.log("window.debug", window.debug);
console.log("typeof(debug)", typeof(debug));
console.log("$.fn.jquery", $.fn.jquery);
console.log("window.$.fn.jquery", window.$.fn.jquery); ChromeXtUserScript output
DevTool Console
tampermonkeyUserScript output
DevTool Console
Script with none// ==UserScript==
// @name debug
// @namespace debug
// @version 0.0.1
// @description debug
// @author debug
// @match https://*/*
// @match http://*/*
// @require https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.slim.min.js
// @grant none
// ==/UserScript==
window.debug="window";
console.log("window.debug", window.debug);
console.log("typeof(debug)", typeof(debug));
console.log("$.fn.jquery", $.fn.jquery);
console.log("window.$.fn.jquery", window.$.fn.jquery); ChromeXtUserScript output
DevTool Console
tampermonkeyUserScript output
DevTool Console
|
Beta Was this translation helpful? Give feedback.
-
Test on https://www.jetbrains.com/ ,webpage default Jquery version UserScript 1 with
|
Beta Was this translation helpful? Give feedback.
-
Are there any plans to address this issue? |
Beta Was this translation helpful? Give feedback.
-
This is actually the intended behavior, I added it in a9af491 |
Beta Was this translation helpful? Give feedback.
-
The problem is already fixed, you can add
to avoid the overwriting issue. |
Beta Was this translation helpful? Give feedback.
-
I try this userscript in ChromeXt(v3.8.2) and tampermonkey on PC
ChromeXt result
tampermonkey
Beta Was this translation helpful? Give feedback.
All reactions