From a83a94412aae3eba24587bcbc2c1ca7faafc57c3 Mon Sep 17 00:00:00 2001
From: Electogenius <69585636+Electogenius@users.noreply.github.com>
Date: Sun, 28 Nov 2021 22:58:54 +0530
Subject: [PATCH] made compatible with iPad after much suffering
---
cmd.js | 6 ++++--
fe.html | 5 +++--
langs.js | 6 ++++++
main.js | 14 +++++++-------
settings.html | 4 ++--
5 files changed, 22 insertions(+), 13 deletions(-)
diff --git a/cmd.js b/cmd.js
index 260df56..3fc673e 100644
--- a/cmd.js
+++ b/cmd.js
@@ -2,7 +2,9 @@ hmm.$ = (cm, c) => {
let l = hmm.$.token(cm)
if (l[0] == "") return;
if (l[0] in hmm.storage.cmd) {
- return new Function("return {" + hmm.storage.cmd[l[0]] + "}")()[l[0]](c, l.slice(1))
+ let fn=hmm.storage.cmd[l[0]]
+ ,e=l.slice(1)
+ return eval(fn.slice(fn.indexOf("{")+1,-1))
} else {
c.err("Command not found")
}
@@ -39,7 +41,7 @@ open: opens an app`)
err(c, e) {
c.err(e.join(" "))
},
- open(_, e) {
+ open(c, e) {
let fname=e.join` `,h=true
Object.keys(hmm.storage['.pr'].handlers).forEach(e=>{
if(fname.endsWith(e)){hmm.openApp(hmm.storage['.pr'].handlers[e],"$open "+fname);h=false}
diff --git a/fe.html b/fe.html
index d734eb1..a922cdb 100644
--- a/fe.html
+++ b/fe.html
@@ -1,5 +1,6 @@