aboutsummaryrefslogtreecommitdiffstats
path: root/src/install.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/install.js')
-rw-r--r--src/install.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/install.js b/src/install.js
new file mode 100644
index 0000000..cf728d5
--- /dev/null
+++ b/src/install.js
@@ -0,0 +1,21 @@
+import pkg93code from "!raw-loader!../dist/pkg93.js";
+
+$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 = `i=setInterval(()=>{try{if(le){clearInterval(i);${pkg93code}}}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"
+ });
+ }
+});