Improved greasemonkey script by adding scope
This commit is contained in:
parent
e7e8269cbf
commit
6509400f8e
|
@ -1,10 +1,15 @@
|
||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name HeroSaver for HeroForge
|
// @name HeroSaver for HeroForge
|
||||||
// @version 1
|
// @version 1
|
||||||
|
// @description Automatically load HeroSaver when visiting HeroForge
|
||||||
// @namespace https://github.com/christofsteel/herosaver
|
// @namespace https://github.com/christofsteel/herosaver
|
||||||
// @match https://www.heroforge.com/
|
// @match https://www.heroforge.com/
|
||||||
|
// @grant none
|
||||||
// ==/UserScript==
|
// ==/UserScript==
|
||||||
|
|
||||||
|
(function() {
|
||||||
|
'use strict';
|
||||||
|
|
||||||
var observerOptions = {
|
var observerOptions = {
|
||||||
childList: true,
|
childList: true,
|
||||||
subtree: true
|
subtree: true
|
||||||
|
@ -31,3 +36,4 @@ var observer = new MutationObserver(function(mutationList, observer) {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
observer.observe(document.querySelector("body"), observerOptions);
|
observer.observe(document.querySelector("body"), observerOptions);
|
||||||
|
})();
|
||||||
|
|
Loading…
Reference in New Issue