Merge pull request #345 from younesaassila/v2.3.9

Release version 2.3.9
This commit is contained in:
Younes Aassila 2024-08-28 11:54:42 +02:00 committed by GitHub
commit fe9f9dff3e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 423 additions and 138 deletions

543
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{
"name": "ttv-lol-pro",
"version": "2.3.8",
"version": "2.3.9",
"description": "TTV LOL PRO removes most livestream ads from Twitch.",
"@parcel/bundler-default": {
"minBundles": 10000000,
@ -44,13 +44,13 @@
"dependencies": {
"bowser": "^2.11.0",
"ip-address": "^9.0.5",
"m3u8-parser": "^7.1.0"
"m3u8-parser": "^7.2.0"
},
"devDependencies": {
"@parcel/config-webextension": "^2.12.0",
"@types/chrome": "^0.0.270",
"@types/jsbn": "^1.2.33",
"@types/node": "^20.16.1",
"@types/node": "^20.16.2",
"@types/webextension-polyfill": "^0.12.0",
"buffer": "^6.0.3",
"os-browserify": "^0.3.0",

View File

@ -3,7 +3,7 @@
"name": "TTV LOL PRO",
"description": "TTV LOL PRO removes most livestream ads from Twitch.",
"homepage_url": "https://github.com/younesaassila/ttv-lol-pro",
"version": "2.3.8",
"version": "2.3.9",
"background": {
"service_worker": "background/background.ts",
"type": "module"

View File

@ -3,7 +3,7 @@
"name": "TTV LOL PRO",
"description": "TTV LOL PRO removes most livestream ads from Twitch.",
"homepage_url": "https://github.com/younesaassila/ttv-lol-pro",
"version": "2.3.8",
"version": "2.3.9",
"background": {
"scripts": ["background/background.ts"],
"persistent": false

View File

@ -51,9 +51,13 @@ window.Worker = class Worker extends NATIVE_WORKER {
return;
}
// Required for VAFT (>=12.0.0) compatibility.
const isAlreadyHooked = NATIVE_WORKER.toString().includes("twitch");
const NATIVE_WORKER_STRING = NATIVE_WORKER.toString();
const isAlreadyHooked =
NATIVE_WORKER_STRING.includes("twitch") &&
(NATIVE_WORKER_STRING.includes("getAdBlockDiv") ||
NATIVE_WORKER_STRING.includes("getAdDiv"));
if (isAlreadyHooked) {
console.info("[TTV LOL PRO] Another Twitch ad blocker is in use.");
console.error("[TTV LOL PRO] Another Twitch ad blocker is in use.");
sendMessageToContentScript({
type: MessageType.MultipleAdBlockersInUse,
});