aboutsummaryrefslogtreecommitdiffstats
path: root/install.js
blob: 16f12e63b36b2361e21bc0d2c11b2fe2938c320a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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 " + _pkg93tagtoinstall + " installer, what do you want to do?",
  title: "pkg93 installer",
  btnOk: "Install/upgrade pkg93",
  btnCancel: "Run away",
  img: "//cdn.rawgit.com/1024x2/pkg93/70039c02/pkg.png"
}, function(isOK) {
  if (isOK) {
    var _main = `var interval = setInterval(function () {
  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({
      msg: "pkg93 has installed successfully!",
      title: "pkg93 installer",
      btnOk: "kthxbai",
      img: "//cdn.rawgit.com/1024x2/pkg93/70039c02/pkg.png"
    });
  }
});