aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUnknown2018-06-08 23:10:50 +0100
committerUnknown2018-06-08 23:10:50 +0100
commit806b6cdb3cc7de31e54da4fcd953d325c92a1aca (patch)
tree812c36605a1ae1d383542bdd138856777bbeb291
parent400ba1053343f3d4e61d73affc10741813d2728e (diff)
improve installer a bit more
-rw-r--r--install.js24
1 files changed, 13 insertions, 11 deletions
diff --git a/install.js b/install.js
index 0a72476..16f12e6 100644
--- a/install.js
+++ b/install.js
@@ -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({