From 8f721ee34f0765a39514c848c9c39a20aca9ef22 Mon Sep 17 00:00:00 2001
From: Unknown
Date: Sat, 16 Jun 2018 11:45:57 +0100
Subject: remove incomplete version
---
pkg93.js | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/pkg93.js b/pkg93.js
index 2de828f..9fff393 100644
--- a/pkg93.js
+++ b/pkg93.js
@@ -154,11 +154,10 @@ var pkg93 = {
res();
});
},
- get: async function(pkg, ver, cli) {
+ get: async function(pkg, cli) {
cli = cli || {log: (i) => {$log(i);}};
- ver = ver || "latest";
var config = pkg93.getConfig();
- cli.log("SRCH " + pkg + "@" + ver);
+ cli.log("SRCH " + pkg);
var index = config.pkglist.findIndex(function(string) {
return string.split("@")[0] == pkg;
});
@@ -195,10 +194,7 @@ var pkg93 = {
cli.log("DONE " + dest);
var json = JSON.parse(xhr.responseText);
localStorage[".pkg93/packages/" + pkgname + ".json"] = JSON.stringify(json);
- if (ver == "latest") {
- ver = json.versions[0];
- }
- var dest2 = pkgsource + "/" + pkgname + "/" + ver + "/" + json.inject;
+ var dest2 = pkgsource + "/" + pkgname + "/" + json.inject;
cli.log("GET " + dest2);
var bardiv2 = cli.log(_abarpkg93uses(60, 0));
var xhr2 = new XMLHttpRequest();
@@ -226,7 +222,7 @@ var pkg93 = {
eval(script);
if (json.uninstall) {
// no xhr this time
- var uninst = await (await (fetch(pkgsource + "/" + pkgname + "/" + ver + "/" + json.uninstall))).text();
+ var uninst = await (await (fetch(pkgsource + "/" + pkgname + "/" + json.uninstall))).text();
localStorage[".pkg93/packages/" + pkgname + ".rm.js"] = uninst;
}
cli.log("OK Injected package!");
@@ -363,8 +359,7 @@ If you find my software useful, consider donating ERR You're trying to modify a pre-installed Windows93 app.\n Don't do that!");
} else {
- var split = args[1].split("@");
- await pkg93.get(split[0], split[1], cli);
+ await pkg93.get(args[1], cli);
}
} else if (args[0] == "rm") {
if (args.length < 2) {
--
cgit v1.2.3