-
Notifications
You must be signed in to change notification settings - Fork 57
/
herosaver-autoloader.user.js
39 lines (34 loc) · 1.7 KB
/
herosaver-autoloader.user.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// ==UserScript==
// @name Herosaver Autoloader
// @author TeaWithLucas
// @namespace https://github.com/TeaWithLucas/Herosaver/
// @description Autoloader for the Herosaver Script
// @version 1
// @include *example.com/*
// @include *forge.com/*
// @installURL https://raw.githubusercontent.com/TeaWithLucas/Herosaver/master/herosaver-autoloader.user.js
// @downloadURL https://raw.githubusercontent.com/TeaWithLucas/Herosaver/master/herosaver-autoloader.user.js
// @updateURL https://raw.githubusercontent.com/TeaWithLucas/Herosaver/master/herosaver-autoloader.user.js
// @run-at document-end
// ==/UserScript==
/*
* This file is a Greasemonkey user script. To install it, you need
* the Firefox plugin "Greasemonkey" (URL: http://greasemonkey.mozdev.org/)
* After you installed the extension, restart Firefox and revisit
* this script. Now you will see a new menu item "Install User Script"
* in your tools menu.
*
* To uninstall this script, go to your "Tools" menu and select
* "Manage User Scripts", then select this script from the list
* and click uninstall :-)
*
* Creative Commons Attribution License (--> or Public Domain)
* http://creativecommons.org/licenses/by/2.5/
*/
//object constructor
function runinsert(){
// run the Herosaver Script
var xhr=new XMLHttpRequest;xhr.open("get","https://raw.githubusercontent.com/TeaWithLucas/Herosaver/master/dist/saver.min.js",true);xhr.onreadystatechange=function(){if(xhr.readyState==4){var script=document.createElement("script");script.type="text/javascript";script.text=xhr.responseText;document.body.appendChild(script)}};xhr.send(null);
};
//instantiate and run
runinsert();