I can't wait to whitelist selected channels on youtube

Funny enough I found you guys with the same goal (supporting TB).Dr.Bones wrote:Thanks a Bunch schippi!
I actually wanted to support TotalBiscuit. Your script inserted into Tampermonkey did the trick. I just needed a while to figure out to whitelist stuff in ABP you just add a filter
. The only thing i needed to change was the last line to actually change the href property of the window.location element. For some reason it would work manually but not in a tampermonkey script. The script below is the one that worked for me. All credits go to schippi
And dont forget to add the filter to AdBlock Plus!Code: Select all
// ==UserScript== // @name Youtube opt in Ads per channel // @namespace schippi // @include http://www.youtube.com/watch* // @include https://www.youtube.com/watch* // @version 1 // ==/UserScript== var u = window.location.href; if(u.search("user=") == -1){ var cont = document.getElementById("watch7-user-header").innerHTML; var user=cont.replace(/.+\/user\//i,'').replace(/\?(?:.|\s)*/m,''); window.location.href = u+"&user="+user; }
Code: Select all
// ==UserScript==
// @name Youtube opt in Ads per channel
// @namespace schippi
// @include http://www.youtube.com/watch*
// @include https://www.youtube.com/watch*
// @version 1.1
// ==/UserScript==
var u = window.location.href;
if(u.search("user=") == -1){
if (!! document.getElementById("ud")) {
var user = document.getElementById("ud").getElementsByTagName("a")[0].getAttribute("href").split("/")[2];
window.location.href = u+"&user="+user;
}
else if (!! document.getElementById("watch7-user-header")) {
var cont = document.getElementById("watch7-user-header").innerHTML;
var user=cont.replace(/.+\/user\//i,'').replace(/\?(?:.|\s)*/m,'');
window.location.href = u+"&user="+user;
}
else {
alert('script failed');
}
}
It works in Feather, but something seems to be wrong for normal pages. I get a massive line of text after the channel name:Dubious wrote:Funny enough I found you guys with the same goal (supporting TB).Dr.Bones wrote:Thanks a Bunch schippi!
I actually wanted to support TotalBiscuit. Your script inserted into Tampermonkey did the trick. I just needed a while to figure out to whitelist stuff in ABP you just add a filter
. The only thing i needed to change was the last line to actually change the href property of the window.location element. For some reason it would work manually but not in a tampermonkey script. The script below is the one that worked for me. All credits go to schippi
And dont forget to add the filter to AdBlock Plus!Code: Select all
// ==UserScript== // @name Youtube opt in Ads per channel // @namespace schippi // @include http://www.youtube.com/watch* // @include https://www.youtube.com/watch* // @version 1 // ==/UserScript== var u = window.location.href; if(u.search("user=") == -1){ var cont = document.getElementById("watch7-user-header").innerHTML; var user=cont.replace(/.+\/user\//i,'').replace(/\?(?:.|\s)*/m,''); window.location.href = u+"&user="+user; }
Below is my modified script, which now supports both vanilla Youtube and FeatherBeta Youtube
https://www.youtube.com/feather_beta
FYI, don't forget to add the ABP filter as well
Start Script:
Code: Select all
// ==UserScript== // @name Youtube opt in Ads per channel // @namespace schippi // @include http://www.youtube.com/watch* // @include https://www.youtube.com/watch* // @version 1.1 // ==/UserScript== var u = window.location.href; if(u.search("user=") == -1){ if (!! document.getElementById("ud")) { var user = document.getElementById("ud").getElementsByTagName("a")[0].getAttribute("href").split("/")[2]; window.location.href = u+"&user="+user; } else if (!! document.getElementById("watch7-user-header")) { var cont = document.getElementById("watch7-user-header").innerHTML; var user=cont.replace(/.+\/user\//i,'').replace(/\?(?:.|\s)*/m,''); window.location.href = u+"&user="+user; } else { alert('script failed'); } }
Code: Select all
https://www.youtube.com/watch?v=3SZhsFmK5CY&user=LetsPlay%22%20class=%22yt-user-photo%20%20yt-uix-sessionlink%22%20data-sessionlink=%22ei=53MgU_utD4WkmQXY34GYBg&feature=watch%22%3E%20%20%20%20%3Cspan%20class=%22video-thumb%20%20yt-thumb%20yt-thumb-48%20g-hovercard%22%20data-ytid=%22UCkxctb0jr8vwa4Do6c6su0Q%22%3E%20%20%20%20%20%20%3Cspan%20class=%22yt-thumb-square%22%3E%20%20%20%20%20%20%20%20%3Cspan%20class=%22yt-thumb-clip%22%3E%20%20%20%20%20%20%20%20%20%20%3Cimg%20src=%22https://yt3.ggpht.com/-f70aQff_iKE/AAAAAAAAAAI/AAAAAAAAAAA/-R40EvoOKf0/s48-c-k-no/photo.jpg%22%20alt=%22LetsPlay%22%20width=%2248%22%20height=%2248%22%3E%20%20%20%20%20%20%20%20%20%20%3Cspan%20class=%22vertical-align%22%3E%3C/span%3E%20%20%20%20%20%20%20%20%3C/span%3E%20%20%20%20%20%20%3C/span%3E%20%20%20%20%3C/span%3E%3C/a%3E%3Ca%20href=%22/user/LetsPlay%22%20class=%22g-hovercard%20yt-uix-sessionlink%20yt-user-name%20%22%20data-sessionlink=%22ei=53MgU_utD4WkmQXY34GYBg&feature=watch%22%20dir=%22ltr%22%20data-ytid=%22UCkxctb0jr8vwa4Do6c6su0Q%22%20data-name=%22watch%22%3ELetsPlay%3C/a%3E%20%20%3Cimg%20src=%22https://s.ytimg.com/yts/img/pixel-vfl3z5WfW.gif%22%20class=%22yt-uix-tooltip%20yt-channel-title-icon-verified%22%20alt=%22%22%20title=%22Verified%22%3E%3Cspan%20class=%22yt-user-separator%22%3E%C2%B7%3C/span%3E%3Ca%20class=%22yt-uix-sessionlink%20yt-user-videos%22%20href=%22/user/LetsPlay/videos%22%20data-sessionlink=%22ei=53MgU_utD4WkmQXY34GYBg&feature=watch%22%3E329%20videos%3C/a%3E%3Cbr%3E%3Cspan%20id=%22watch7-subscription-container%22%3E%3Cspan%20class=%22%20yt-uix-button-subscription-container%20with-preferences%22%3E%3Cbutton%20type=%22button%22%20aria-role=%22button%22%20onclick=%22;return%20false;%22%20class=%22yt-uix-subscription-button%20yt-can-buffer%20hover-enabled%20yt-uix-button%20yt-uix-button-subscribed-branded%20yt-uix-button-size-default%20yt-uix-button-has-icon%22%20aria-busy=%22false%22%20aria-live=%22polite%22%20data-subscription-id=%22lSjlou52qJ5TTqK2d8i9H6flgcIYu5cKL2k5tyCsu1o%22%20data-sessionlink=%22ei=53MgU_utD4WkmQXY34GYBg&ved=CBoQmys&feature=watch%22%20data-style-type=%22branded%22%20data-is-subscribed=%22True%22%20data-channel-external-id=%22UCkxctb0jr8vwa4Do6c6su0Q%22%20role=%22button%22%3E%3Cspan%20class=%22yt-uix-button-icon-wrapper%22%3E%3Cimg%20class=%22yt-uix-button-icon%20yt-uix-button-icon-subscribe%22%20src=%22https://s.ytimg.com/yts/img/pixel-vfl3z5WfW.gif%22%20alt=%22%22%20title=%22%22%3E%3C/span%3E%3Cspan%20class=%22yt-uix-button-content%22%3E%3Cspan%20class=%22subscribe-label%22%20aria-label=%22Subscribe%22%3ESubscribe%3C/span%3E%3Cspan%20class=%22subscribed-label%22%20aria-label=%22Unsubscribe%22%3ESubscribed%3C/span%3E%3Cspan%20class=%22unsubscribe-label%22%20aria-label=%22Unsubscribe%22%3EUnsubscribe%3C/span%3E%20%3C/span%3E%3C/button%3E%3Cbutton%20type=%22button%22%20class=%22yt-uix-subscription-preferences-button%20yt-uix-button%20yt-uix-button-default%20yt-uix-button-size-default%20yt-uix-button-has-icon%20yt-uix-button-empty%22%20onclick=%22;return%20false;%22%20data-subscription-id=%22lSjlou52qJ5TTqK2d8i9H6flgcIYu5cKL2k5tyCsu1o%22%20data-channel-external-id=%22UCkxctb0jr8vwa4Do6c6su0Q%22%20role=%22button%22%3E%3Cspan%20class=%22yt-uix-button-icon-wrapper%22%3E%3Cimg%20class=%22yt-uix-button-icon%20yt-uix-button-icon-subscription-preferences%22%20src=%22https://s.ytimg.com/yts/img/pixel-vfl3z5WfW.gif%22%20alt=%22%22%20title=%22%22%3E%3C/span%3E%3C/button%3E%3Cspan%20class=%22yt-subscription-button-subscriber-count-branded-horizontal%22%3E2,323,492%3C/span%3E%20%20%3Cspan%20class=%22yt-subscription-button-disabled-mask%22%20title=%22%22%3E%3C/span%3E%20%20%20%20%3Cdiv%20class=%22yt-uix-overlay%20%22%20data-overlay-style=%22primary%22%20data-overlay-shape=%22tiny%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cdiv%20class=%22yt-dialog%20hid%20%22%3E%20%20%20%20%3Cdiv%20class=%22yt-dialog-base%22%3E%20%20%20%20%20%20%3Cspan%20class=%22yt-dialog-align%22%3E%3C/span%3E%20%20%20%20%20%20%3Cdiv%20class=%22yt-dialog-fg%22%3E%20%20%20%20%20%20%20%20%3Cdiv%20class=%22yt-dialog-fg-content%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cdiv%20class=%22yt-dialog-header%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Ch2%20class=%22yt-dialog-title%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20Subscription%20preferences%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C/h2%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C/div%3E%20%20%20%20%20%20%20%20%20%20%3Cdiv%20class=%22yt-dialog-loading%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cdiv%20class=%22yt-dialog-waiting-content%22%3E%20%20%20%20%3Cdiv%20class=%22yt-spinner-img%22%3E%3C/div%3E%3Cdiv%20class=%22yt-dialog-waiting-text%22%3ELoading...%3C/div%3E%20%20%3C/div%3E%20%20%20%20%20%20%20%20%20%20%3C/div%3E%20%20%20%20%20%20%20%20%20%20%3Cdiv%20class=%22yt-dialog-content%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cdiv%20class=%22subscription-preferences-overlay-content-container%22%3E%20%20%20%20%3Cdiv%20class=%22subscription-preferences-overlay-loading%20%22%3E%20%20%20%20%20%20%20%20%3Cp%20class=%22yt-spinner%22%3E%20%20%20%20%20%20%3Cimg%20class=%22yt-spinner-img%22%20src=%22https://s.ytimg.com/yts/img/pixel-vfl3z5WfW.gif%22%20alt=%22Loading%20icon%22%20title=%22%22%3E%20%20%20%20%3Cspan%20class=%22yt-spinner-message%22%3ELoading...%20%20%20%20%3C/span%3E%20%20%3C/p%3E%20%20%20%20%3C/div%3E%20%20%20%20%3Cdiv%20class=%22subscription-preferences-overlay-content%22%3E%20%20%20%20%3C/div%3E%20%20%3C/div%3E%20%20%20%20%20%20%20%20%20%20%3C/div%3E%20%20%20%20%20%20%20%20%20%20%3Cdiv%20class=%22yt-dialog-working%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cdiv%20id=%22yt-dialog-working-overlay%22%3E%20%20%3C/div%3E%20%20%3Cdiv%20id=%22yt-dialog-working-bubble%22%3E%20%20%20%20%3Cdiv%20class=%22yt-dialog-waiting-content%22%3E%20%20%20%20%20%20%3Cdiv%20class=%22yt-spinner-img%22%3E%3C/div%3E%3Cdiv%20class=%22yt-dialog-waiting-text%22%3EWorking...%3C/div%3E%20%20%20%20%3C/div%3E%20%20%3C/div%3E%20%20%20%20%20%20%20%20%20%20%3C/div%3E%20%20%20%20%20%20%20%20%3C/div%3E%20%20%20%20%20%20%3C/div%3E%20%20%20%20%3C/div%3E%20%20%3C/div%3E%20%20%3C/div%3E%3C/span%3E%3C/span%3E%3Cdiv%20id=%22watch7-views-info%22%3E%20%20%20%20%20%20%3Cspan%20class=%22watch-view-count%20%22%3E%20%20%20%20369,165%20%20%3C/span%3E%20%20%3Cdiv%20class=%22video-extras-sparkbars%22%3E%20%20%20%20%3Cdiv%20class=%22video-extras-sparkbar-likes%22%20style=%22width:%2098.9315152132%%22%3E%3C/div%3E%20%20%20%20%3Cdiv%20class=%22video-extras-sparkbar-dislikes%22%20style=%22width:%201.06848478681%%22%3E%3C/div%3E%20%20%3C/div%3E%20%20%3Cspan%20class=%22video-extras-likes-dislikes%22%3E%20%20%20%20%20%20%3Cimg%20id=%22watch-stats-like%22%20class=%22icon-watch-stats-like%22%20src=%22https://s.ytimg.com/yts/img/pixel-vfl3z5WfW.gif%22%20alt=%22Like%22%3E%20%20%3Cspan%20class=%22likes-count%22%3E9,722%3C/span%3E%20%20%20%20 %20%20%20%20%20%20%3Cimg%20id=%22watch-stats-dislike%22%20class=%22icon-watch-stats-dislike%22%20src=%22https://s.ytimg.com/yts/img/pixel-vfl3z5WfW.gif%22%20alt=%22Dislike%22%3E%20%20%3Cspan%20class=%22dislikes-count%22%3E105%3C/span%3E%20%20%3C/span%3E%3C/div%3E
CheckingAround wrote:It works in Feather, but something seems to be wrong for normal pages. I get a massive line of text after the channel name:Dubious wrote:Funny enough I found you guys with the same goal (supporting TB).Dr.Bones wrote:Thanks a Bunch schippi!
I actually wanted to support TotalBiscuit. Your script inserted into Tampermonkey did the trick. I just needed a while to figure out to whitelist stuff in ABP you just add a filter
. The only thing i needed to change was the last line to actually change the href property of the window.location element. For some reason it would work manually but not in a tampermonkey script. The script below is the one that worked for me. All credits go to schippi
And dont forget to add the filter to AdBlock Plus!Code: Select all
// ==UserScript== // @name Youtube opt in Ads per channel // @namespace schippi // @include http://www.youtube.com/watch* // @include https://www.youtube.com/watch* // @version 1 // ==/UserScript== var u = window.location.href; if(u.search("user=") == -1){ var cont = document.getElementById("watch7-user-header").innerHTML; var user=cont.replace(/.+\/user\//i,'').replace(/\?(?:.|\s)*/m,''); window.location.href = u+"&user="+user; }
Below is my modified script, which now supports both vanilla Youtube and FeatherBeta Youtube
https://www.youtube.com/feather_beta
FYI, don't forget to add the ABP filter as well
Start Script:
Code: Select all
// ==UserScript== // @name Youtube opt in Ads per channel // @namespace schippi // @include http://www.youtube.com/watch* // @include https://www.youtube.com/watch* // @version 1.1 // ==/UserScript== var u = window.location.href; if(u.search("user=") == -1){ if (!! document.getElementById("ud")) { var user = document.getElementById("ud").getElementsByTagName("a")[0].getAttribute("href").split("/")[2]; window.location.href = u+"&user="+user; } else if (!! document.getElementById("watch7-user-header")) { var cont = document.getElementById("watch7-user-header").innerHTML; var user=cont.replace(/.+\/user\//i,'').replace(/\?(?:.|\s)*/m,''); window.location.href = u+"&user="+user; } else { alert('script failed'); } }
Code: Select all
https://www.youtube.com/watch?v=3SZhsFmK5CY&user=LetsPlay%22%20class=%22yt-user-photo%20%20yt-uix-sessionlink%22%20data-sessionlink=%22ei=53MgU_utD4WkmQXY34GYBg&feature=watch%22%3E%20%20%20%20%3Cspan%20class=%22video-thumb%20%20yt-thumb%20yt-thumb-48%20g-hovercard%22%20data-ytid=%22UCkxctb0jr8vwa4Do6c6su0Q%22%3E%20%20%20%20%20%20%3Cspan%20class=%22yt-thumb-square%22%3E%20%20%20%20%20%20%20%20%3Cspan%20class=%22yt-thumb-clip%22%3E%20%20%20%20%20%20%20%20%20%20%3Cimg%20src=%22https://yt3.ggpht.com/-f70aQff_iKE/AAAAAAAAAAI/AAAAAAAAAAA/-R40EvoOKf0/s48-c-k-no/photo.jpg%22%20alt=%22LetsPlay%22%20width=%2248%22%20height=%2248%22%3E%20%20%20%20%20%20%20%20%20%20%3Cspan%20class=%22vertical-align%22%3E%3C/span%3E%20%20%20%20%20%20%20%20%3C/span%3E%20%20%20%20%20%20%3C/span%3E%20%20%20%20%3C/span%3E%3C/a%3E%3Ca%20href=%22/user/LetsPlay%22%20class=%22g-hovercard%20yt-uix-sessionlink%20yt-user-name%20%22%20data-sessionlink=%22ei=53MgU_utD4WkmQXY34GYBg&feature=watch%22%20dir=%22ltr%22%20data-ytid=%22UCkxctb0jr8vwa4Do6c6su0Q%22%20data-name=%22watch%22%3ELetsPlay%3C/a%3E%20%20%3Cimg%20src=%22https://s.ytimg.com/yts/img/pixel-vfl3z5WfW.gif%22%20class=%22yt-uix-tooltip%20yt-channel-title-icon-verified%22%20alt=%22%22%20title=%22Verified%22%3E%3Cspan%20class=%22yt-user-separator%22%3E%C2%B7%3C/span%3E%3Ca%20class=%22yt-uix-sessionlink%20yt-user-videos%22%20href=%22/user/LetsPlay/videos%22%20data-sessionlink=%22ei=53MgU_utD4WkmQXY34GYBg&feature=watch%22%3E329%20videos%3C/a%3E%3Cbr%3E%3Cspan%20id=%22watch7-subscription-container%22%3E%3Cspan%20class=%22%20yt-uix-button-subscription-container%20with-preferences%22%3E%3Cbutton%20type=%22button%22%20aria-role=%22button%22%20onclick=%22;return%20false;%22%20class=%22yt-uix-subscription-button%20yt-can-buffer%20hover-enabled%20yt-uix-button%20yt-uix-button-subscribed-branded%20yt-uix-button-size-default%20yt-uix-button-has-icon%22%20aria-busy=%22false%22%20aria-live=%22polite%22%20data-subscription-id=%22lSjlou52qJ5TTqK2d8i9H6flgcIYu5cKL2k5tyCsu1o%22%20data-sessionlink=%22ei=53MgU_utD4WkmQXY34GYBg&ved=CBoQmys&feature=watch%22%20data-style-type=%22branded%22%20data-is-subscribed=%22True%22%20data-channel-external-id=%22UCkxctb0jr8vwa4Do6c6su0Q%22%20role=%22button%22%3E%3Cspan%20class=%22yt-uix-button-icon-wrapper%22%3E%3Cimg%20class=%22yt-uix-button-icon%20yt-uix-button-icon-subscribe%22%20src=%22https://s.ytimg.com/yts/img/pixel-vfl3z5WfW.gif%22%20alt=%22%22%20title=%22%22%3E%3C/span%3E%3Cspan%20class=%22yt-uix-button-content%22%3E%3Cspan%20class=%22subscribe-label%22%20aria-label=%22Subscribe%22%3ESubscribe%3C/span%3E%3Cspan%20class=%22subscribed-label%22%20aria-label=%22Unsubscribe%22%3ESubscribed%3C/span%3E%3Cspan%20class=%22unsubscribe-label%22%20aria-label=%22Unsubscribe%22%3EUnsubscribe%3C/span%3E%20%3C/span%3E%3C/button%3E%3Cbutton%20type=%22button%22%20class=%22yt-uix-subscription-preferences-button%20yt-uix-button%20yt-uix-button-default%20yt-uix-button-size-default%20yt-uix-button-has-icon%20yt-uix-button-empty%22%20onclick=%22;return%20false;%22%20data-subscription-id=%22lSjlou52qJ5TTqK2d8i9H6flgcIYu5cKL2k5tyCsu1o%22%20data-channel-external-id=%22UCkxctb0jr8vwa4Do6c6su0Q%22%20role=%22button%22%3E%3Cspan%20class=%22yt-uix-button-icon-wrapper%22%3E%3Cimg%20class=%22yt-uix-button-icon%20yt-uix-button-icon-subscription-preferences%22%20src=%22https://s.ytimg.com/yts/img/pixel-vfl3z5WfW.gif%22%20alt=%22%22%20title=%22%22%3E%3C/span%3E%3C/button%3E%3Cspan%20class=%22yt-subscription-button-subscriber-count-branded-horizontal%22%3E2,323,492%3C/span%3E%20%20%3Cspan%20class=%22yt-subscription-button-disabled-mask%22%20title=%22%22%3E%3C/span%3E%20%20%20%20%3Cdiv%20class=%22yt-uix-overlay%20%22%20data-overlay-style=%22primary%22%20data-overlay-shape=%22tiny%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cdiv%20class=%22yt-dialog%20hid%20%22%3E%20%20%20%20%3Cdiv%20class=%22yt-dialog-base%22%3E%20%20%20%20%20%20%3Cspan%20class=%22yt-dialog-align%22%3E%3C/span%3E%20%20%20%20%20%20%3Cdiv%20class=%22yt-dialog-fg%22%3E%20%20%20%20%20%20%20%20%3Cdiv%20class=%22yt-dialog-fg-content%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cdiv%20class=%22yt-dialog-header%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Ch2%20class=%22yt-dialog-title%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20Subscription%20preferences%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C/h2%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C/div%3E%20%20%20%20%20%20%20%20%20%20%3Cdiv%20class=%22yt-dialog-loading%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cdiv%20class=%22yt-dialog-waiting-content%22%3E%20%20%20%20%3Cdiv%20class=%22yt-spinner-img%22%3E%3C/div%3E%3Cdiv%20class=%22yt-dialog-waiting-text%22%3ELoading...%3C/div%3E%20%20%3C/div%3E%20%20%20%20%20%20%20%20%20%20%3C/div%3E%20%20%20%20%20%20%20%20%20%20%3Cdiv%20class=%22yt-dialog-content%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cdiv%20class=%22subscription-preferences-overlay-content-container%22%3E%20%20%20%20%3Cdiv%20class=%22subscription-preferences-overlay-loading%20%22%3E%20%20%20%20%20%20%20%20%3Cp%20class=%22yt-spinner%22%3E%20%20%20%20%20%20%3Cimg%20class=%22yt-spinner-img%22%20src=%22https://s.ytimg.com/yts/img/pixel-vfl3z5WfW.gif%22%20alt=%22Loading%20icon%22%20title=%22%22%3E%20%20%20%20%3Cspan%20class=%22yt-spinner-message%22%3ELoading...%20%20%20%20%3C/span%3E%20%20%3C/p%3E%20%20%20%20%3C/div%3E%20%20%20%20%3Cdiv%20class=%22subscription-preferences-overlay-content%22%3E%20%20%20%20%3C/div%3E%20%20%3C/div%3E%20%20%20%20%20%20%20%20%20%20%3C/div%3E%20%20%20%20%20%20%20%20%20%20%3Cdiv%20class=%22yt-dialog-working%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cdiv%20id=%22yt-dialog-working-overlay%22%3E%20%20%3C/div%3E%20%20%3Cdiv%20id=%22yt-dialog-working-bubble%22%3E%20%20%20%20%3Cdiv%20class=%22yt-dialog-waiting-content%22%3E%20%20%20%20%20%20%3Cdiv%20class=%22yt-spinner-img%22%3E%3C/div%3E%3Cdiv%20class=%22yt-dialog-waiting-text%22%3EWorking...%3C/div%3E%20%20%20%20%3C/div%3E%20%20%3C/div%3E%20%20%20%20%20%20%20%20%20%20%3C/div%3E%20%20%20%20%20%20%20%20%3C/div%3E%20%20%20%20%20%20%3C/div%3E%20%20%20%20%3C/div%3E%20%20%3C/div%3E%20%20%3C/div%3E%3C/span%3E%3C/span%3E%3Cdiv%20id=%22watch7-views-info%22%3E%20%20%20%20%20%20%3Cspan%20class=%22watch-view-count%20%22%3E%20%20%20%20369,165%20%20%3C/span%3E%20%20%3Cdiv%20class=%22video-extras-sparkbars%22%3E%20%20%20%20%3Cdiv%20class=%22video-extras-sparkbar-likes%22%20style=%22width:%2098.9315152132%%22%3E%3C/div%3E%20%20%20%20%3Cdiv%20class=%22video-extras-sparkbar-dislikes%22%20style=%22width:%201.06848478681%%22%3E%3C/div%3E%20%20%3C/div%3E%20%20%3Cspan%20class=%22video-extras-likes-dislikes%22%3E%20%20%20%20%20%20%3Cimg%20id=%22watch-stats-like%22%20class=%22icon-watch-stats-like%22%20src=%22https://s.ytimg.com/yts/img/pixel-vfl3z5WfW.gif%22%20alt=%22Like%22%3E%20%20%3Cspan%20class=%22likes-count%22%3E9,722%3C/span%3E%20%20%20%20 %20%20%20%20%20%20%3Cimg%20id=%22watch-stats-dislike%22%20class=%22icon-watch-stats-dislike%22%20src=%22https://s.ytimg.com/yts/img/pixel-vfl3z5WfW.gif%22%20alt=%22Dislike%22%3E%20%20%3Cspan%20class=%22dislikes-count%22%3E105%3C/span%3E%20%20%3C/span%3E%3C/div%3E
They're doing what the title of this thread says. Adblock Plus blocks content based on URL patterns. Since there's nothing in an average video URL that identifies the author, the user script puts that information there. You can then create an exception filter in Adblock Plus to allow all content from that author.averageuser wrote:I don't really get what yall are doing with those scripts.
That's a blocking filter. What you want is an exception filter. So delete that one and add something likeI don't know how to code wrote:Then added the URL "https://www.youtube.com/user/TotalHalibut" to the filter in ABP.
Code: Select all
@@||youtube.com/*user=TotalHalibut$document
Code: Select all
// ==UserScript==
// @name Expose Youtube Uploader Name in URL
// @namespace schippi
// @description Used to expose a Youtube uploaders displayname in the URL
// @include http://www.youtube.com/watch*
// @include https://www.youtube.com/watch*
// @version 1.2
// @grant none
// ==/UserScript==
// Credits go to Schippi and Dubious for doing the base work which I've modified here.
var url = window.location.href;
if ( url.search( "channel=" ) == -1 )
{
if ( document.getElementById( "watch7-user-header" ) != null )
{
var channelNameContainer = document.getElementsByClassName("yt-user-name")[0];
//var channelName = channelNameContainer.innerHTML;
//The above 'channelName' is not used below. Could be an option instead of 'channelURL', but often contain spaces, and might not be unique.
var channelURL = channelNameContainer.getAttribute("href");
channelURL = channelURL.replace( '/user/', '' );
//window.location.href = url + "&channel=" + channelName; //alterative for name insertion rather than channel-url.
window.location.href = url + "&channel=" + channelURL;
}
}
Hah, that's weird!Dr.Bones wrote:Thanks a Bunch schippi!
I actually wanted to support TotalBiscuit.
Would it be possible for the ads on Youtube to be blocked without the creator of the video loosing ad revenue?SNLThe_Office wrote:A helpful feature that AdBlock Plus could have would be the ability to enable ads before YouTube videos on certain channels. The user would be able to make a list of the channels that they are willing to see ads on, and AdBlock would block the ads on the other channels. This would be helpful for those who believe that certain channels deserve the monetary compensation they receive from AdWords and they are willing to watch ads for them while blocking the ads on the channels that the user would prefer not to see ads on.
TrySpecimen wrote:@@|http://www.youtube.com/watch*user=GameGrumps
Code: Select all
@@||youtube.com/*user=GameGrumps$document