mirror of
https://github.com/bytedream/stream-bypass.git
synced 2025-06-28 11:00:32 +02:00
Make mv3 compatible
This commit is contained in:
@ -1,13 +1,9 @@
|
||||
import './shared';
|
||||
|
||||
import type { Match } from '~/lib/match';
|
||||
import { storageDelete, storageGet, storageSet } from '~/lib/settings';
|
||||
import { getMatch } from '~/lib/match';
|
||||
|
||||
chrome.runtime.onMessage.addListener(async (message) => {
|
||||
if (message.action == 'ff2mpv') {
|
||||
await chrome.runtime.sendNativeMessage('ff2mpv', { url: message.url });
|
||||
}
|
||||
});
|
||||
|
||||
chrome.webRequest.onBeforeRedirect.addListener(
|
||||
async (details) => {
|
||||
// check if redirects origins from a previous redirect
|
1
src/entries/background/mv3.ts
Normal file
1
src/entries/background/mv3.ts
Normal file
@ -0,0 +1 @@
|
||||
import './shared';
|
5
src/entries/background/shared.ts
Normal file
5
src/entries/background/shared.ts
Normal file
@ -0,0 +1,5 @@
|
||||
chrome.runtime.onMessage.addListener(async (message) => {
|
||||
if (message.action == 'ff2mpv') {
|
||||
await chrome.runtime.sendNativeMessage('ff2mpv', { url: message.url });
|
||||
}
|
||||
});
|
Reference in New Issue
Block a user