mirror of
https://github.com/pixeltris/TwitchAdSolutions.git
synced 2025-04-30 06:34:33 +02:00
Make the midroll ad banner more consistent
This commit is contained in:
parent
3d2fd22e92
commit
ac645eaa17
10
README.md
10
README.md
@ -10,7 +10,7 @@ M3U8 proxies (or full proxies) are currently the most reliable way of avoiding a
|
|||||||
- `Twitch Video Ad Blocker` by squizc - [chrome](https://chrome.google.com/webstore/detail/ttv-intrusive-ad-blocker/gggloiaahekkkndacnpecpgafnehmlja) / [firefox](https://addons.mozilla.org/en-GB/firefox/addon/twitch-video-ad-blocker/) *(proxied url includes your user id / a unique id used for gql requests)*
|
- `Twitch Video Ad Blocker` by squizc - [chrome](https://chrome.google.com/webstore/detail/ttv-intrusive-ad-blocker/gggloiaahekkkndacnpecpgafnehmlja) / [firefox](https://addons.mozilla.org/en-GB/firefox/addon/twitch-video-ad-blocker/) *(proxied url includes your user id / a unique id used for gql requests)*
|
||||||
- `proxy-m3u8` - see below (currently uses the proxy server by ChoosenEye)
|
- `proxy-m3u8` - see below (currently uses the proxy server by ChoosenEye)
|
||||||
|
|
||||||
If you don't trust third parties then `dyn-skip` / `dyn-skip-midroll` are decent. `ttv-tools` (firefox) also has nice features.
|
If you don't trust third parties then `dyn-skip` / `dyn-skip-midroll-alt` are decent. `ttv-tools` (firefox) also has nice features.
|
||||||
|
|
||||||
## Current solutions
|
## Current solutions
|
||||||
|
|
||||||
@ -18,13 +18,11 @@ If you don't trust third parties then `dyn-skip` / `dyn-skip-midroll` are decent
|
|||||||
|
|
||||||
- dyn-skip ([ublock](https://github.com/pixeltris/TwitchAdSolutions/raw/master/dyn-skip/dyn-skip-ublock-origin.js) / [userscript](https://github.com/pixeltris/TwitchAdSolutions/raw/master/dyn-skip/dyn-skip.user.js))
|
- dyn-skip ([ublock](https://github.com/pixeltris/TwitchAdSolutions/raw/master/dyn-skip/dyn-skip-ublock-origin.js) / [userscript](https://github.com/pixeltris/TwitchAdSolutions/raw/master/dyn-skip/dyn-skip.user.js))
|
||||||
- Notifies Twitch that ads were watched before requesting the main live stream.
|
- Notifies Twitch that ads were watched before requesting the main live stream.
|
||||||
- May slightly slow down loading of streams.
|
|
||||||
- Falls back to mute-black if this fails (use an alternative solution if it always fails for you, as it adds additional load).
|
- Falls back to mute-black if this fails (use an alternative solution if it always fails for you, as it adds additional load).
|
||||||
- **Currently only handles pre-rolls** (mid-roll ads should be muted/blacked out) (mid-rolls will require a player reload, which currently isn't implemented)
|
- *Midroll ads are muted/blacked out, try `dyn-skip-midroll` or `dyn-skip-midroll-alt` for a more complete solution.*
|
||||||
- dyn-skip-midroll ([ublock](https://github.com/pixeltris/TwitchAdSolutions/raw/master/dyn-skip-midroll/dyn-skip-midroll-ublock-origin.js) / [userscript](https://github.com/pixeltris/TwitchAdSolutions/raw/master/dyn-skip-midroll/dyn-skip-midroll.user.js))
|
- dyn-skip-midroll ([ublock](https://github.com/pixeltris/TwitchAdSolutions/raw/master/dyn-skip-midroll/dyn-skip-midroll-ublock-origin.js) / [userscript](https://github.com/pixeltris/TwitchAdSolutions/raw/master/dyn-skip-midroll/dyn-skip-midroll.user.js))
|
||||||
- The same as `dyn-skip`, but also skips midroll ads (experimental/untested).
|
- The same as `dyn-skip`, but also *attempts* to skip midroll ads (it looks like this results in a reload loop, an alternative is `dyn-skip-midroll-alt`).
|
||||||
- This requires the script to work perfectly, otherwise the player will hit a reload loop.
|
- **This requires the script to work perfectly, otherwise the player will hit a reload loop.**
|
||||||
- *From testing midroll ads result in a reload loop, possibly try `dyn-skip-midroll-alt` instead.*
|
|
||||||
- dyn-skip-midroll-alt ([ublock](https://github.com/pixeltris/TwitchAdSolutions/raw/master/dyn-skip-midroll-alt/dyn-skip-midroll-alt-ublock-origin.js) / [userscript](https://github.com/pixeltris/TwitchAdSolutions/raw/master/dyn-skip-midroll-alt/dyn-skip-midroll-alt.user.js))
|
- dyn-skip-midroll-alt ([ublock](https://github.com/pixeltris/TwitchAdSolutions/raw/master/dyn-skip-midroll-alt/dyn-skip-midroll-alt-ublock-origin.js) / [userscript](https://github.com/pixeltris/TwitchAdSolutions/raw/master/dyn-skip-midroll-alt/dyn-skip-midroll-alt.user.js))
|
||||||
- A mix of `dyn-skip-midroll` / `dyn` to avoid player reload spam during midroll ads (player reloads are limited to 60 seconds apart, low resolution stream plays when nothing else is available - might be a little glitchy but better than player reload spam).
|
- A mix of `dyn-skip-midroll` / `dyn` to avoid player reload spam during midroll ads (player reloads are limited to 60 seconds apart, low resolution stream plays when nothing else is available - might be a little glitchy but better than player reload spam).
|
||||||
- dyn-video-swap ([ublock](https://github.com/pixeltris/TwitchAdSolutions/raw/master/dyn-video-swap/dyn-video-swap-ublock-origin.js) / [userscript](https://github.com/pixeltris/TwitchAdSolutions/raw/master/dyn-video-swap/dyn-video-swap.user.js))
|
- dyn-video-swap ([ublock](https://github.com/pixeltris/TwitchAdSolutions/raw/master/dyn-video-swap/dyn-video-swap-ublock-origin.js) / [userscript](https://github.com/pixeltris/TwitchAdSolutions/raw/master/dyn-video-swap/dyn-video-swap.user.js))
|
||||||
|
@ -96,7 +96,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
function getAdDiv() {
|
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 playerRootDiv = document.querySelector('.video-player');
|
||||||
var adDiv = null;
|
var adDiv = null;
|
||||||
if (playerRootDiv != null) {
|
if (playerRootDiv != null) {
|
||||||
@ -144,7 +144,8 @@
|
|||||||
if (!OPT_MODE_STRIP_AD_SEGMENTS) {
|
if (!OPT_MODE_STRIP_AD_SEGMENTS) {
|
||||||
return textStr;
|
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'});
|
postMessage({key:'UboShowAdBanner'});
|
||||||
} else {
|
} else {
|
||||||
postMessage({key:'UboHideAdBanner'});
|
postMessage({key:'UboHideAdBanner'});
|
||||||
|
@ -87,7 +87,7 @@ twitch-videoad.js application/javascript
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
function getAdDiv() {
|
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 playerRootDiv = document.querySelector('.video-player');
|
||||||
var adDiv = null;
|
var adDiv = null;
|
||||||
if (playerRootDiv != null) {
|
if (playerRootDiv != null) {
|
||||||
@ -135,7 +135,8 @@ twitch-videoad.js application/javascript
|
|||||||
if (!OPT_MODE_STRIP_AD_SEGMENTS) {
|
if (!OPT_MODE_STRIP_AD_SEGMENTS) {
|
||||||
return textStr;
|
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'});
|
postMessage({key:'UboShowAdBanner'});
|
||||||
} else {
|
} else {
|
||||||
postMessage({key:'UboHideAdBanner'});
|
postMessage({key:'UboHideAdBanner'});
|
||||||
|
@ -96,7 +96,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
function getAdDiv() {
|
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 playerRootDiv = document.querySelector('.video-player');
|
||||||
var adDiv = null;
|
var adDiv = null;
|
||||||
if (playerRootDiv != null) {
|
if (playerRootDiv != null) {
|
||||||
@ -144,7 +144,8 @@
|
|||||||
if (!OPT_MODE_STRIP_AD_SEGMENTS) {
|
if (!OPT_MODE_STRIP_AD_SEGMENTS) {
|
||||||
return textStr;
|
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'});
|
postMessage({key:'UboShowAdBanner'});
|
||||||
} else {
|
} else {
|
||||||
postMessage({key:'UboHideAdBanner'});
|
postMessage({key:'UboHideAdBanner'});
|
||||||
|
@ -87,7 +87,7 @@ twitch-videoad.js application/javascript
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
function getAdDiv() {
|
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 playerRootDiv = document.querySelector('.video-player');
|
||||||
var adDiv = null;
|
var adDiv = null;
|
||||||
if (playerRootDiv != null) {
|
if (playerRootDiv != null) {
|
||||||
@ -135,7 +135,8 @@ twitch-videoad.js application/javascript
|
|||||||
if (!OPT_MODE_STRIP_AD_SEGMENTS) {
|
if (!OPT_MODE_STRIP_AD_SEGMENTS) {
|
||||||
return textStr;
|
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'});
|
postMessage({key:'UboShowAdBanner'});
|
||||||
} else {
|
} else {
|
||||||
postMessage({key:'UboHideAdBanner'});
|
postMessage({key:'UboHideAdBanner'});
|
||||||
|
@ -96,7 +96,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
function getAdDiv() {
|
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 playerRootDiv = document.querySelector('.video-player');
|
||||||
var adDiv = null;
|
var adDiv = null;
|
||||||
if (playerRootDiv != null) {
|
if (playerRootDiv != null) {
|
||||||
@ -144,7 +144,8 @@
|
|||||||
if (!OPT_MODE_STRIP_AD_SEGMENTS) {
|
if (!OPT_MODE_STRIP_AD_SEGMENTS) {
|
||||||
return textStr;
|
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'});
|
postMessage({key:'UboShowAdBanner'});
|
||||||
} else {
|
} else {
|
||||||
postMessage({key:'UboHideAdBanner'});
|
postMessage({key:'UboHideAdBanner'});
|
||||||
|
@ -87,7 +87,7 @@ twitch-videoad.js application/javascript
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
function getAdDiv() {
|
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 playerRootDiv = document.querySelector('.video-player');
|
||||||
var adDiv = null;
|
var adDiv = null;
|
||||||
if (playerRootDiv != null) {
|
if (playerRootDiv != null) {
|
||||||
@ -135,7 +135,8 @@ twitch-videoad.js application/javascript
|
|||||||
if (!OPT_MODE_STRIP_AD_SEGMENTS) {
|
if (!OPT_MODE_STRIP_AD_SEGMENTS) {
|
||||||
return textStr;
|
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'});
|
postMessage({key:'UboShowAdBanner'});
|
||||||
} else {
|
} else {
|
||||||
postMessage({key:'UboHideAdBanner'});
|
postMessage({key:'UboHideAdBanner'});
|
||||||
|
@ -96,7 +96,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
function getAdDiv() {
|
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 playerRootDiv = document.querySelector('.video-player');
|
||||||
var adDiv = null;
|
var adDiv = null;
|
||||||
if (playerRootDiv != null) {
|
if (playerRootDiv != null) {
|
||||||
@ -144,7 +144,8 @@
|
|||||||
if (!OPT_MODE_STRIP_AD_SEGMENTS) {
|
if (!OPT_MODE_STRIP_AD_SEGMENTS) {
|
||||||
return textStr;
|
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'});
|
postMessage({key:'UboShowAdBanner'});
|
||||||
} else {
|
} else {
|
||||||
postMessage({key:'UboHideAdBanner'});
|
postMessage({key:'UboHideAdBanner'});
|
||||||
|
@ -87,7 +87,7 @@ twitch-videoad.js application/javascript
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
function getAdDiv() {
|
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 playerRootDiv = document.querySelector('.video-player');
|
||||||
var adDiv = null;
|
var adDiv = null;
|
||||||
if (playerRootDiv != null) {
|
if (playerRootDiv != null) {
|
||||||
@ -135,7 +135,8 @@ twitch-videoad.js application/javascript
|
|||||||
if (!OPT_MODE_STRIP_AD_SEGMENTS) {
|
if (!OPT_MODE_STRIP_AD_SEGMENTS) {
|
||||||
return textStr;
|
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'});
|
postMessage({key:'UboShowAdBanner'});
|
||||||
} else {
|
} else {
|
||||||
postMessage({key:'UboHideAdBanner'});
|
postMessage({key:'UboHideAdBanner'});
|
||||||
|
@ -96,7 +96,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
function getAdDiv() {
|
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 playerRootDiv = document.querySelector('.video-player');
|
||||||
var adDiv = null;
|
var adDiv = null;
|
||||||
if (playerRootDiv != null) {
|
if (playerRootDiv != null) {
|
||||||
@ -144,7 +144,8 @@
|
|||||||
if (!OPT_MODE_STRIP_AD_SEGMENTS) {
|
if (!OPT_MODE_STRIP_AD_SEGMENTS) {
|
||||||
return textStr;
|
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'});
|
postMessage({key:'UboShowAdBanner'});
|
||||||
} else {
|
} else {
|
||||||
postMessage({key:'UboHideAdBanner'});
|
postMessage({key:'UboHideAdBanner'});
|
||||||
|
@ -87,7 +87,7 @@ twitch-videoad.js application/javascript
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
function getAdDiv() {
|
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 playerRootDiv = document.querySelector('.video-player');
|
||||||
var adDiv = null;
|
var adDiv = null;
|
||||||
if (playerRootDiv != null) {
|
if (playerRootDiv != null) {
|
||||||
@ -135,7 +135,8 @@ twitch-videoad.js application/javascript
|
|||||||
if (!OPT_MODE_STRIP_AD_SEGMENTS) {
|
if (!OPT_MODE_STRIP_AD_SEGMENTS) {
|
||||||
return textStr;
|
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'});
|
postMessage({key:'UboShowAdBanner'});
|
||||||
} else {
|
} else {
|
||||||
postMessage({key:'UboHideAdBanner'});
|
postMessage({key:'UboHideAdBanner'});
|
||||||
|
@ -96,7 +96,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
function getAdDiv() {
|
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 playerRootDiv = document.querySelector('.video-player');
|
||||||
var adDiv = null;
|
var adDiv = null;
|
||||||
if (playerRootDiv != null) {
|
if (playerRootDiv != null) {
|
||||||
@ -144,7 +144,8 @@
|
|||||||
if (!OPT_MODE_STRIP_AD_SEGMENTS) {
|
if (!OPT_MODE_STRIP_AD_SEGMENTS) {
|
||||||
return textStr;
|
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'});
|
postMessage({key:'UboShowAdBanner'});
|
||||||
} else {
|
} else {
|
||||||
postMessage({key:'UboHideAdBanner'});
|
postMessage({key:'UboHideAdBanner'});
|
||||||
|
@ -87,7 +87,7 @@ twitch-videoad.js application/javascript
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
function getAdDiv() {
|
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 playerRootDiv = document.querySelector('.video-player');
|
||||||
var adDiv = null;
|
var adDiv = null;
|
||||||
if (playerRootDiv != null) {
|
if (playerRootDiv != null) {
|
||||||
@ -135,7 +135,8 @@ twitch-videoad.js application/javascript
|
|||||||
if (!OPT_MODE_STRIP_AD_SEGMENTS) {
|
if (!OPT_MODE_STRIP_AD_SEGMENTS) {
|
||||||
return textStr;
|
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'});
|
postMessage({key:'UboShowAdBanner'});
|
||||||
} else {
|
} else {
|
||||||
postMessage({key:'UboHideAdBanner'});
|
postMessage({key:'UboHideAdBanner'});
|
||||||
|
@ -96,7 +96,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
function getAdDiv() {
|
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 playerRootDiv = document.querySelector('.video-player');
|
||||||
var adDiv = null;
|
var adDiv = null;
|
||||||
if (playerRootDiv != null) {
|
if (playerRootDiv != null) {
|
||||||
@ -144,7 +144,8 @@
|
|||||||
if (!OPT_MODE_STRIP_AD_SEGMENTS) {
|
if (!OPT_MODE_STRIP_AD_SEGMENTS) {
|
||||||
return textStr;
|
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'});
|
postMessage({key:'UboShowAdBanner'});
|
||||||
} else {
|
} else {
|
||||||
postMessage({key:'UboHideAdBanner'});
|
postMessage({key:'UboHideAdBanner'});
|
||||||
|
@ -87,7 +87,7 @@ twitch-videoad.js application/javascript
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
function getAdDiv() {
|
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 playerRootDiv = document.querySelector('.video-player');
|
||||||
var adDiv = null;
|
var adDiv = null;
|
||||||
if (playerRootDiv != null) {
|
if (playerRootDiv != null) {
|
||||||
@ -135,7 +135,8 @@ twitch-videoad.js application/javascript
|
|||||||
if (!OPT_MODE_STRIP_AD_SEGMENTS) {
|
if (!OPT_MODE_STRIP_AD_SEGMENTS) {
|
||||||
return textStr;
|
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'});
|
postMessage({key:'UboShowAdBanner'});
|
||||||
} else {
|
} else {
|
||||||
postMessage({key:'UboHideAdBanner'});
|
postMessage({key:'UboHideAdBanner'});
|
||||||
|
@ -96,7 +96,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
function getAdDiv() {
|
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 playerRootDiv = document.querySelector('.video-player');
|
||||||
var adDiv = null;
|
var adDiv = null;
|
||||||
if (playerRootDiv != null) {
|
if (playerRootDiv != null) {
|
||||||
@ -144,7 +144,8 @@
|
|||||||
if (!OPT_MODE_STRIP_AD_SEGMENTS) {
|
if (!OPT_MODE_STRIP_AD_SEGMENTS) {
|
||||||
return textStr;
|
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'});
|
postMessage({key:'UboShowAdBanner'});
|
||||||
} else {
|
} else {
|
||||||
postMessage({key:'UboHideAdBanner'});
|
postMessage({key:'UboHideAdBanner'});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user