diff options
author | Unknown | 2018-06-08 23:04:18 +0100 |
---|---|---|
committer | Unknown | 2018-06-08 23:04:18 +0100 |
commit | 400ba1053343f3d4e61d73affc10741813d2728e (patch) | |
tree | ac7b0439b5381e998f2fe3777d50b12ab7011c7e /install.js | |
parent | d085bfe0cbd2e7862daf7efff6b956809c16ec8d (diff) |
progress bar, improved installer
Diffstat (limited to 'install.js')
-rw-r--r-- | install.js | 40 |
1 files changed, 28 insertions, 12 deletions
@@ -1,13 +1,29 @@ -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); +$alert({ + msg: "Welcome to teh pkg93 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://rawgit.com/pkg93/pkg93/master/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" + }); } -}, 5000);`; -localStorage["boot/pkg93.js"] = _main; -eval(_main); // jshint ignore:line
\ No newline at end of file +});
\ No newline at end of file |