diff options
| -rw-r--r-- | install.js | 24 | 
1 files changed, 13 insertions, 11 deletions
| @@ -1,5 +1,7 @@ +var _pkg93tagtoinstall = "master";   // tag/branch to install +var _pkg93cdn = false;               // set this to true to load from the cdn (doesn't work with branches)  $alert({ -  msg: "Welcome to teh pkg93 installer, what do you want to do?", +  msg: "Welcome to teh pkg93 " + _pkg93tagtoinstall + " installer, what do you want to do?",    title: "pkg93 installer",    btnOk: "Install/upgrade pkg93",    btnCancel: "Run away", @@ -7,16 +9,16 @@ $alert({  }, function(isOK) {    if (isOK) {      var _main = `var interval = setInterval(function () { -      try { -        if (!!le) { -          localStorage[".pkg93/userscript"] = ""; -          clearInterval(interval); -          $loader.script("https://rawgit.com/pkg93/pkg93/master/pkg93.js"); -        } -      } catch (err) { -        console.error(err); -      } -    }, 5000);`; +  try { +    if (!!le) { +      localStorage[".pkg93/userscript"] = ""; +      clearInterval(interval); +      $loader.script("https://${_pkg93cdn ? "cdn." : ""}rawgit.com/pkg93/pkg93/${_pkg93tagtoinstall}/pkg93.js"); +    } +  } catch (err) { +    console.error(err); +  } +}, 5000);`;      localStorage["boot/pkg93.js"] = _main;      eval(_main);      $alert({ | 
