From 524745a0ba9420158fbb3c582f44fa69c964f7ac Mon Sep 17 00:00:00 2001 From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com> Date: Tue, 19 Apr 2022 16:49:11 +0300 Subject: [PATCH 1/4] Update manifest.js --- manifest.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/manifest.js b/manifest.js index 6c0139da7d..14ba4f0101 100644 --- a/manifest.js +++ b/manifest.js @@ -21,22 +21,21 @@ let manifest = { ], "file_handlers": [ { - "action": window.location.origin + "/full?file=true", - "name": "Code", + "action": "/full", "accept": { - "text/*": [".js", ".json", ".html", ".css", ".htm", ".svg", ".ts", ".mjs", ".py", ".scss"] + "text/css": [".css"] } } ], "share_target": { - "action": window.location.origin + "/full?file=true", + "action": "/full", "method": "POST", "enctype": "multipart/form-data", "params": { "files": [ { "name": "file", - "accept": ["text/*", ".js", ".json", ".html", ".css", ".htm", ".svg", ".ts", ".mjs", ".py", ".scss"] + "accept": ["text/css", "application/json", ".css"] } ] } From 70e97ff575719c95f4ac6422b1f4c3b2c4decef2 Mon Sep 17 00:00:00 2001 From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com> Date: Tue, 19 Apr 2022 16:51:53 +0300 Subject: [PATCH 2/4] Update utils.js --- utils.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/utils.js b/utils.js index ca3c184b67..f0c682316c 100644 --- a/utils.js +++ b/utils.js @@ -169,6 +169,8 @@ let isLandscape = window.matchMedia('(orientation: landscape)').matches; let isOffline = !window.navigator.onLine; +let isEmbed = (window.top !== window); + if (isMobile) { body.classList.add('mobile'); From 90700b31b08d0d56f677bc24ce37868034033036 Mon Sep 17 00:00:00 2001 From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com> Date: Tue, 19 Apr 2022 16:52:58 +0300 Subject: [PATCH 3/4] Update manifest.js --- manifest.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manifest.js b/manifest.js index 14ba4f0101..c51981b675 100644 --- a/manifest.js +++ b/manifest.js @@ -21,14 +21,14 @@ let manifest = { ], "file_handlers": [ { - "action": "/full", + "action": window.location.origin + "/full", "accept": { "text/css": [".css"] } } ], "share_target": { - "action": "/full", + "action": window.location.origin + "/full", "method": "POST", "enctype": "multipart/form-data", "params": { From 35ed6820f2422f93c53f19358fd15875021b012b Mon Sep 17 00:00:00 2001 From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com> Date: Tue, 19 Apr 2022 16:56:26 +0300 Subject: [PATCH 4/4] Update repos.js --- repos.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repos.js b/repos.js index ae7d16ab39..83a6b79d64 100644 --- a/repos.js +++ b/repos.js @@ -120,7 +120,7 @@ async function fetchRepoAndSaveToModRepos(treeLoc) { (tempRepo.selBranch ?? repo.default_branch), - (tempRepo.pushAccess ?? (repo.permissions.push ?? false)), + (tempRepo.pushAccess ?? ((repo.permissions && repo.permissions.push) ?? false)), (tempRepo.branches ?? null),