From 97e484d122ebb7bc55e4e795403e9fe152095f53 Mon Sep 17 00:00:00 2001 From: Hakadao Date: Wed, 10 Apr 2024 15:30:17 +0800 Subject: [PATCH] feat: support firefox(REAL) (#500) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * refactor: new rule support `Chromium` and `Firefox` * refactor: add default `priority` * fix: `message.bilibili.com` not working * fix: `show.bilibili.com` not working * fix: 修复一些子站的问题 * 添加了一些其他的子站 * fix(VideoCard): bug fixes (#316) (#319) (#320) * fix(VideoCard): fix double page open on author's name click (#315) * fix(VideoCard): ensure clicking on bangumi name or avatar goes to the right page * feat(Settings): add an "always show top bar logo" setting (#219) * feat(Settings): add discord link to about page * feat(Settings): redesign settings panel * style(Settings): adjust the block ads position * feat(Settings): add credits section on about page * chore(Settings): add ChatGPT to the credits section * feat(Settings): redesign settings panel * style: decrease the content opacity in light mode decrease the opacity in light mode to ensure the text can be seen clearly * refactor: remove the "backdrop-glass" shortcut * refactor: rename `--bew-filter-glass` to `--bew-filter-glass-1` * feat: add performance settings * chore: remove the credits section * feat(TopBar): add top bar icon badges config * feat(VideoCard): implement adaptive width in horizontal mode * feat(Home): implement grid layout switcher * feat(Dock): redesign dock * style: adjust dock styles * style: add edge glow effect in some dialogs * fix(Dock): active color incorrect when hovering dock item in dark mode * chore: update version number * feat(manifest): add extension id when in firefox * refactor(rules.json): reduce redundant code --------- Co-authored-by: starknt <1431880400@qq.com> --- assets/rules.json | 6 ++++-- src/manifest.ts | 8 ++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/assets/rules.json b/assets/rules.json index ca397ae6..9c30657d 100644 --- a/assets/rules.json +++ b/assets/rules.json @@ -20,7 +20,8 @@ "condition": { "domainType": "thirdParty", "urlFilter": "||api.bilibili.com", - "resourceTypes": ["xmlhttprequest"] + "resourceTypes": ["xmlhttprequest"], + "requestMethods": ["post"] } }, { @@ -44,7 +45,8 @@ "condition": { "domainType": "thirdParty", "urlFilter": "||passport.bilibili.com", - "resourceTypes": ["xmlhttprequest"] + "resourceTypes": ["xmlhttprequest"], + "requestMethods": ["post"] } } ] diff --git a/src/manifest.ts b/src/manifest.ts index 1c5bac03..215ef4fb 100644 --- a/src/manifest.ts +++ b/src/manifest.ts @@ -80,5 +80,13 @@ export async function getManifest() { if (isDev) manifest.permissions?.push('webNavigation') + if (isFirefox) { + manifest.browser_specific_settings = { + gecko: { + id: 'addon@bewlybewly.com', + }, + } + } + return manifest }