Skip to content

Instantly share code, notes, and snippets.

@arantius
Last active November 7, 2023 22:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arantius/0dc6a6f59e70e7e8f2d2905c77c2d393 to your computer and use it in GitHub Desktop.
Save arantius/0dc6a6f59e70e7e8f2d2905c77c2d393 to your computer and use it in GitHub Desktop.
Greasemonkey downloader test
// ==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);
})();
console.log('the @required script has executed');
A simple resource file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment