Make the midroll ad banner more consistent

This commit is contained in:
pixeltris
2020-12-29 21:18:57 +00:00
parent 3d2fd22e92
commit ac645eaa17
16 changed files with 49 additions and 36 deletions
@@ -87,7 +87,7 @@ twitch-videoad.js application/javascript
}
}
function getAdDiv() {
var msg = 'uBlock Origin is waiting for ads to finish...';
var msg = 'Waiting for ads to finish...';
var playerRootDiv = document.querySelector('.video-player');
var adDiv = null;
if (playerRootDiv != null) {
@@ -135,7 +135,8 @@ twitch-videoad.js application/javascript
if (!OPT_MODE_STRIP_AD_SEGMENTS) {
return textStr;
}
if (haveAdTags && !textStr.includes(LIVE_SIGNIFIER)) {
// NOTE: midroll ads are intertwined with live segments, always display the banner on midroll ads
if (haveAdTags && (!textStr.includes(LIVE_SIGNIFIER) || textStr.includes('MIDROLL'))) {
postMessage({key:'UboShowAdBanner'});
} else {
postMessage({key:'UboHideAdBanner'});
+3 -2
View File
@@ -96,7 +96,7 @@
}
}
function getAdDiv() {
var msg = 'uBlock Origin is waiting for ads to finish...';
var msg = 'Waiting for ads to finish...';
var playerRootDiv = document.querySelector('.video-player');
var adDiv = null;
if (playerRootDiv != null) {
@@ -144,7 +144,8 @@
if (!OPT_MODE_STRIP_AD_SEGMENTS) {
return textStr;
}
if (haveAdTags && !textStr.includes(LIVE_SIGNIFIER)) {
// NOTE: midroll ads are intertwined with live segments, always display the banner on midroll ads
if (haveAdTags && (!textStr.includes(LIVE_SIGNIFIER) || textStr.includes('MIDROLL'))) {
postMessage({key:'UboShowAdBanner'});
} else {
postMessage({key:'UboHideAdBanner'});