From 493b0e1bc5fe05d94ca5e30810f27101b3942ce3 Mon Sep 17 00:00:00 2001
From: Unknown
Date: Fri, 20 Apr 2018 23:14:03 +0100
Subject: moar cleanups
---
pkg93.js | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/pkg93.js b/pkg93.js
index 9a50de0..789a6f1 100644
--- a/pkg93.js
+++ b/pkg93.js
@@ -6,7 +6,7 @@ try {
localStorage[".pkg93/config.json"] = '{"repos": ["http://codinggamerhd.com/main-repo"], "installed": [], "pkglist": []}';
}
var config = JSON.parse(localStorage[".pkg93/config.json"]);
- config.installed.forEach(function (pkg) {
+ config.installed.forEach(function(pkg) {
eval(localStorage[".pkg93/packages/" + pkg + ".js"]);
});
} catch (err) {
@@ -28,7 +28,7 @@ var pkg93 = {
var request = new XMLHttpRequest();
$log("WARN Windows93 may lag while getting packages.\n This is a normal thing.");
config.pkglist = [];
- config.repos.forEach(function (source) {
+ config.repos.forEach(function(source) {
$log("GET " + source);
request.open('GET', source + "/repo.json", false);
try {
@@ -71,11 +71,13 @@ var pkg93 = {
var json = JSON.parse(request.responseText);
localStorage[".pkg93/packages/" + pkgname + ".json"] = request.responseText;
if (json.dependencies) {
- json.dependencies.forEach(function (pkg) {
+ json.dependencies.forEach(function(pkg) {
try {
$log("DPND Getting dependency \"" + pkg + "\"");
output = pkg93.get(pkg);
- if (!output) {throw new Error("Dependency \"" + pkg + "\" failed to install. Current package may not work!");}
+ if (!output) {
+ throw new Error("Dependency \"" + pkg + "\" failed to install. Current package may not work!");
+ }
} catch (err) {
$log("ERR " + err.message);
}
@@ -103,8 +105,8 @@ var pkg93 = {
}
},
rm: function(pkg) {
- var config = pkg93.getConfig(),
- var request = new XMLHttpRequest(),
+ var config = pkg93.getConfig();
+ var request = new XMLHttpRequest();
var index = config.installed.indexOf(pkg);
if (index < 0) {
$log("ERR Not found.");
@@ -137,7 +139,7 @@ var pkg93 = {
}
}
},
- pkgInfo: function (pkg, onlineOnly) {
+ pkgInfo: function(pkg, onlineOnly) {
var config = pkg93.getConfig
var request = new XMLHttpRequest();
try {
@@ -176,7 +178,7 @@ if (localStorage[".pkg93/userscript"] && localStorage["desktop/Load pkg93.lnk42"
le._apps.pkg93 = {
exec: function() {
pkg93.version = "v1.2.1";
- var protected = ["3d","acid","acidbox","ansi","anthology","arena93","bananamp","base64","bytebeat","calc","castlegafa","catex","cd","clear","clearhist","clippy","code","contact","crazy","defrag","dmg","do a barrel roll","doctor","download","find","font","format","fullscreen","fx","gameoflife","glitch","global thermonuclear war","gravity","hampster","hello","help","hexed","history","hl3","hydra","ie6","iframe","img","info","js","key","killall","layer","lenna","lisa","ls","manifesto","marburg","messenger","mines","necronomicoin","pd","piskel","pkg93","pony","potato","progressquest","pwd","reboot","robby","rotate","shutdown","skifree","solitude","speech","starwars","superplayer","takethis","terminal","textarea","tree","trollbox","vega","virtualpc","vm","wat","whatif","whois","win","zkype"];
+ var protected = ["3d", "acid", "acidbox", "ansi", "anthology", "arena93", "bananamp", "base64", "bytebeat", "calc", "castlegafa", "catex", "cd", "clear", "clearhist", "clippy", "code", "contact", "crazy", "defrag", "dmg", "do a barrel roll", "doctor", "download", "find", "font", "format", "fullscreen", "fx", "gameoflife", "glitch", "global thermonuclear war", "gravity", "hampster", "hello", "help", "hexed", "history", "hl3", "hydra", "ie6", "iframe", "img", "info", "js", "key", "killall", "layer", "lenna", "lisa", "ls", "manifesto", "marburg", "messenger", "mines", "necronomicoin", "pd", "piskel", "pkg93", "pony", "potato", "progressquest", "pwd", "reboot", "robby", "rotate", "shutdown", "skifree", "solitude", "speech", "starwars", "superplayer", "takethis", "terminal", "textarea", "tree", "trollbox", "vega", "virtualpc", "vm", "wat", "whatif", "whois", "win", "zkype"];
var args = this.arg.arguments;
var help = `pkg93 ${pkg93.version}
Usage: pkg93 [command]
@@ -256,7 +258,7 @@ pkg93 rm kebab
$log(config.installed.join("\n"));
} else if (args[1] == "repos") {
lerepos = "";
- config.repos.forEach(function (repo, index) {
+ config.repos.forEach(function(repo, index) {
lerepos += "[" + index + "] " + repo + "
";
});
$log(lerepos);
--
cgit v1.2.3