Created
February 11, 2023 18:32
-
-
Save IzStriker/854b98135b6cab6f06bcaf8cab80fffb to your computer and use it in GitHub Desktop.
Have Tamper Monkey auto load changes for development only
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
"use strict"; | |
const scrape = async () => { | |
const data = await fetch("http://127.0.0.1:8080/index.js"); | |
const script = await data.text(); | |
eval(script); | |
}; | |
GM_registerMenuCommand("Auto Load Example", scrape); | |
})(); | |
// run local webserver using package npm: http-server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
"use strict"; | |
console.log("Hello, World"); | |
})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment