We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ebd566c commit b0e3a9cCopy full SHA for b0e3a9c
1 file changed
src/GM/gm_core.js
@@ -648,7 +648,8 @@
648
try {
649
await loader.loadScripts(requireUrls);
650
651
- const blob = new Blob([userCode], { type: "text/javascript" });
+ const wrappedCode = `(function() {\n'use strict';\n${userCode}\n})();`;
652
+ const blob = new Blob([wrappedCode], { type: "text/javascript" });
653
const blobUrl = URL.createObjectURL(blob);
654
655
await new Promise((resolve, reject) => {
0 commit comments