This commit is contained in:
Hakadao
2023-04-08 00:42:27 +08:00
parent e7a004f243
commit 09043b2cf9

View File

@@ -52,6 +52,8 @@ onMessage('get-current-tab', async () => {
browser.tabs.onUpdated.addListener((tabId: number, changInfo: Tabs.OnUpdatedChangeInfoType, tab: Tabs.Tab) => {
if (
/https?:\/\/bilibili.com\/?$/.test(`${tab.url}`)
|| /https?:\/\/bilibili.com\/index.html\/?$/.test(`${tab.url}`)
|| /https?:\/\/www.bilibili.com\/index.html\/?$/.test(`${tab.url}`)
|| /https?:\/\/www.bilibili.com\/?$/.test(`${tab.url}`)
|| /https?:\/\/bilibili.com\/\?spm_id_from=.*/.test(`${tab.url}`)
|| /https?:\/\/www.bilibili.com\/\?spm_id_from=(.)*/.test(`${tab.url}`)