diff --git a/manifest.js b/manifest.js index 6c0139da7d..c51981b675 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": window.location.origin + "/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": window.location.origin + "/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"] } ] } 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), 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');