From 400ba1053343f3d4e61d73affc10741813d2728e Mon Sep 17 00:00:00 2001 From: Unknown Date: Fri, 8 Jun 2018 23:04:18 +0100 Subject: progress bar, improved installer --- install.js | 40 ++++++++++++++++++++++++++++------------ 1 file changed, 28 insertions(+), 12 deletions(-) (limited to 'install.js') diff --git a/install.js b/install.js index 3dd03ae..0a72476 100644 --- a/install.js +++ b/install.js @@ -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 -- cgit v1.2.3