mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-06-06 03:34:40 +00:00
change update video to youtube embed with auto ad skipping and looping
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import browser from 'webextension-polyfill'
|
||||
import { onError } from './seqta/utils/onError';
|
||||
import { SettingsState } from "./types/storage";
|
||||
import { applyYoutubeStyles } from './seqta/ui/VideoLoader';
|
||||
|
||||
export const openDB = () => {
|
||||
return new Promise((resolve, reject) => {
|
||||
@@ -118,6 +119,16 @@ browser.runtime.onMessage.addListener((request: any, _sender: any, sendResponse:
|
||||
|
||||
GetNews(sendResponse, url);
|
||||
return true;
|
||||
|
||||
case 'youtubeIframe':
|
||||
const { hideControls } = request;
|
||||
|
||||
browser.scripting.executeScript({
|
||||
target: { tabId: _sender.tab.id, allFrames: true },
|
||||
func: applyYoutubeStyles,
|
||||
args: [hideControls]
|
||||
});
|
||||
break;
|
||||
|
||||
default:
|
||||
console.log('Unknown request type');
|
||||
|
||||
Reference in New Issue
Block a user