From e9a6cc467f566228921c8f8eb76613821e70d451 Mon Sep 17 00:00:00 2001 From: Robbie Langer Date: Sun, 3 Jun 2018 09:09:08 -0400 Subject: replaced loadJS with builtin $loader.script --- install.js | 13 ++----------- 1 file 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); -- cgit v1.2.3