Last active
November 7, 2023 22:49
-
-
Save arantius/0dc6a6f59e70e7e8f2d2905c77c2d393 to your computer and use it in GitHub Desktop.
Greasemonkey downloader test
This file contains hidden or 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
// ==UserScript== | |
// @name Download Test | |
// @description Script to test download/install. At least one: require, resource, icon. | |
// @icon /favicon.ico | |
// @require require.js | |
// @resource resource resource.txt | |
// @grant GM.getResourceUrl | |
// ==/UserScript== | |
(async function() { | |
fetch(await GM.getResourceUrl('resource')).then(r => r.text()).then(console.log); | |
})(); |
This file contains hidden or 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
console.log('the @required script has executed'); |
This file contains hidden or 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
A simple resource file. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment