[Hotfix] Hide install theme when loader does not support themes (#47)

This commit is contained in:
Jack 2023-04-03 21:20:42 -04:00 committed by GitHub
parent 5148fdb15f
commit ba20db27d9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -23,7 +23,7 @@ export default () => after("default", ForumPostLongPressActionSheet, ([{ thread
let postType: string; let postType: string;
if (thread.parent_id === PLUGINS_CHANNEL_ID) { if (thread.parent_id === PLUGINS_CHANNEL_ID) {
postType = "Plugin"; postType = "Plugin";
} else if (thread.parent_id === THEMES_CHANNEL_ID) { } else if (thread.parent_id === THEMES_CHANNEL_ID && window.__vendetta_loader?.features.themes) {
postType = "Theme"; postType = "Theme";
} else return; } else return;

View file

@ -14,7 +14,7 @@ export default () => after("showSimpleActionSheet", showSimpleActionSheet, ([{ k
let urlType: string; let urlType: string;
if (url.startsWith(PROXY_PREFIX)) { if (url.startsWith(PROXY_PREFIX)) {
urlType = "Plugin"; urlType = "Plugin";
} else if (url.endsWith(".json")) { } else if (url.endsWith(".json") && window.__vendetta_loader?.features.themes) {
urlType = "Theme"; urlType = "Theme";
} else return; } else return;