aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobbie Langer2018-06-03 09:09:08 -0400
committerRobbie Langer2018-06-03 09:09:08 -0400
commite9a6cc467f566228921c8f8eb76613821e70d451 (patch)
treed77acb8460b40f8b1a59384f2d486e3e9f1701b3
parentc93f073d1da3b08ebc45effdabc91c965a78c5e0 (diff)
replaced loadJS with builtin $loader.script
-rw-r--r--install.js13
1 files changed, 2 insertions, 11 deletions
diff --git a/install.js b/install.js
index d1e7780..1056a70 100644
--- a/install.js
+++ b/install.js
@@ -1,18 +1,9 @@
-var _main = `function loadJS (source, onready){
- var sc = document.createElement("script");
- sc.src = source;
- sc.type = "text/javascript";
- if (onready) sc.addEventListener("load", onready);
- document.head.appendChild(sc);
- return sc;
-}
-
-var interval = setInterval(function () {
+var _main = `var interval = setInterval(function () {
try {
if (!!le) {
localStorage[".pkg93/userscript"] = "";
clearInterval(interval);
- loadJS("https://rawgit.com/pkg93/pkg93/master/pkg93.js", function () {});
+ $loader.script("https://rawgit.com/pkg93/pkg93/master/pkg93.js";
}
} catch (err) {
console.error(err);