New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New "Sign In" request on YouTube #7842
Comments
@yourduskquibbles / @randomcookiemonster yourduskquibbles/webannoyances#245 (comment)
|
Thank you. |
This comment has been minimized.
This comment has been minimized.
It appears intermittently. Thank you. |
https://en.wikipedia.org/wiki/A/B_testing - if Google wants to, it will not see it until it reaches all users. |
I think the signin popup script code is being loaded through You can use ctrl + f and search for minified code section (click to expand)Polymer({is:"ytd-consent-bump-renderer",behaviors:[V.YtRendererBehavior,T.YtActionSenderBehavior,X.YtActionHandlerBehavior],screenLayer:4,properties:{data:{type:Object,observer:"maybeForceConsent_"}},actionMap:{"yt-close-popup-action":"handlePopupClose_"},handlePopupClose_:function(a){this.signinPromptClosed_||"yt-upsell-dialog-renderer"!==a||(this.signinPromptClosed_=!0,this.maybeForceConsent_(this.data))},
created:function(){this.expressVe_=this.acceptVe_=this.lightbox_=null;this.signinPromptClosed_=!0;z("kevlar_sign_in_prompt_before_mandatory_consent")&&(this.signinPromptClosed_=!1);this.disableConsentBump_=z("mandatory_consent_bump")&&!qia()},
ready:function(){var a=this;this.disableConsentBump_||z("kevlar_sign_in_prompt_before_mandatory_consent")&&uk(xk,function(){a.forceShowIfNoBlockingSigninPrompt()},5E3)},
attached:function(){this.disableConsentBump_?this.hideConsentBump_():(this.listen(window,"message","onReceivedMessage_"),this.lightbox_&&this.fire("yt-add-element-to-app",this.lightbox_))},
detached:function(){this.disableConsentBump_||this.unlisten(window,"message","onReceivedMessage_")},
maybeForceConsent_:function(a){this.disableConsentBump_||(a&&this.async(function(){this.fire("yt-consent-bump-display-changed")}),this.initializeVE_(),a&&a.forceConsent?(this.hideConsentBump_(),this.signinPromptClosed_&&(this.async(this.pausePlayer_.bind(this),1E3),this.openLightbox_())):"true"==pl("HideTicker","false")&&this.hideConsentBump_())},
initializeVE_:function(){var a=LN();MN(a,106531,void 0,{layer:4,parentLayer:0});this.acceptVe_=RN(a,{veType:104841},void 0,4);this.expressVe_=RN(a,{veType:105964},void 0,4)},
createLightbox_:function(){var a=document.createElement("ytd-consent-bump-lightbox");a.id="consent-bump";document.body.appendChild(a);this.data&&this.data.forceConsent?(a.getDialog().modal=!0,z("mandatory_consent_bump")&&(a.getDialog().style.maxHeight="550px")):a.getDialog().withBackdrop=!0;this.fire("yt-add-element-to-app",a);return a},
getConsentBumpIcon_:function(a){return a.toLowerCase()},
onReceivedMessage_:function(a){if(!this.lightbox_){var b=this.getLightbox_();if(b)this.lightbox_=b;else return}b=Md(a.origin);if(WLa[b]&&WLa.hasOwnProperty(b)||Gd("consent_url_override"))switch((b=kn(this.getScreenLayer()))&&("cb-ui-done-early"===a.data&&this.acceptVe_?$K(b,this.acceptVe_):"cb-express-done"===a.data&&this.expressVe_&&$K(b,this.expressVe_)),a.data){case"cb-ui-done-early":case"cb-ui-done":case"cb-express-done":case"cb-already-consented":this.hideConsentBump_();case"cb-user-closed":this.lightbox_.getDialog().close();
this.resumePlayer_();break;case"verify-origin":a.source.parent==window&&a.source.postMessage("verify-origin-reply",a.origin);}},
onRemindMeLaterTap_:function(){ol("HideTicker","true",86400);this.hideConsentBump_()},
onReviewTap_:function(){this.pausePlayer_();this.openLightbox_()},
openLightbox_:function(){var a=kn(this.getScreenLayer());a&&(this.acceptVe_&&YK(a,[this.acceptVe_]),this.expressVe_&&z("mandatory_consent_bump")&&YK(a,[this.expressVe_]));(a=this.getLightbox_())||(a=this.createLightbox_());a.getIframe().src=this.data.iframeUrl;this.lightbox_=a;a.getDialog().open()},
pausePlayer_:function(){var a=WO(this);a&&a.pause()},
hideConsentBump_:function(){this.hidden=!0;this.fire("yt-consent-bump-display-changed")},
resumePlayer_:function(){var a=WO(this);a&&a.play()},
getLightbox_:function(){var a=document.querySelector("ytd-app")||document.querySelector("ytg-app");return a?a.querySelector("#consent-bump"):null},
forceShowIfNoBlockingSigninPrompt:function(){var a=this.sendAction("yt-get-popup-opened-action",["yt-upsell-dialog-renderer"]);0!==a.length&&a[0]||this.handlePopupClose_("yt-upsell-dialog-renderer")},get _template(){if(!this.__$tmpl){this.__$tmpl=document.createElement("template");this.__$tmpl.innerHTML="<!--css-build:shady-->\n \n \n <yt-icon id=\"consent-shield\" icon=\"yt-icons:[[getConsentBumpIcon_(data.securityIcon.iconType)]]\" class=\"style-scope ytd-consent-bump-renderer\">\n </yt-icon>\n <yt-formatted-string id=\"alert-message\" text=\"[[data.alertMessage]]\" class=\"style-scope ytd-consent-bump-renderer\">\n </yt-formatted-string>\n <ytd-button-renderer id=\"remind-me-later-button\" data=\"[[data.remindMeLaterButton.buttonRenderer]]\" on-tap=\"onRemindMeLaterTap_\" class=\"style-scope ytd-consent-bump-renderer\">\n </ytd-button-renderer>\n <ytd-button-renderer id=\"review-button\" data=\"[[data.reviewButton.buttonRenderer]]\" on-tap=\"onReviewTap_\" class=\"style-scope ytd-consent-bump-renderer\">\n </ytd-button-renderer>\n "}return this.__$tmpl},set _template(v){this.__$tmpl=v}}); unminified readable format (click to expand)Polymer({
is: "ytd-consent-bump-renderer",
behaviors: [V.YtRendererBehavior, T.YtActionSenderBehavior, X.YtActionHandlerBehavior],
screenLayer: 4,
properties: {
data: {
type: Object,
observer: "maybeForceConsent_"
}
},
actionMap: {
"yt-close-popup-action": "handlePopupClose_"
},
handlePopupClose_: function (a) {
this.signinPromptClosed_ || "yt-upsell-dialog-renderer" !== a || (this.signinPromptClosed_ = !0, this.maybeForceConsent_(this.data))
},
created: function () {
this.expressVe_ = this.acceptVe_ = this.lightbox_ = null;
this.signinPromptClosed_ = !0;
z("kevlar_sign_in_prompt_before_mandatory_consent") && (this.signinPromptClosed_ = !1);
this.disableConsentBump_ = z("mandatory_consent_bump") && !qia()
},
ready: function () {
var a = this;
this.disableConsentBump_ || z("kevlar_sign_in_prompt_before_mandatory_consent") && uk(xk, function () {
a.forceShowIfNoBlockingSigninPrompt()
}, 5E3)
},
attached: function () {
this.disableConsentBump_ ? this.hideConsentBump_() : (this.listen(window, "message", "onReceivedMessage_"), this.lightbox_ && this.fire("yt-add-element-to-app", this.lightbox_))
},
detached: function () {
this.disableConsentBump_ || this.unlisten(window, "message", "onReceivedMessage_")
},
maybeForceConsent_: function (a) {
this.disableConsentBump_ || (a && this.async(function () {
this.fire("yt-consent-bump-display-changed")
}), this.initializeVE_(), a && a.forceConsent ? (this.hideConsentBump_(), this.signinPromptClosed_ && (this.async(this.pausePlayer_.bind(this), 1E3), this.openLightbox_())) : "true" == pl("HideTicker", "false") && this.hideConsentBump_())
},
initializeVE_: function () {
var a = LN();
MN(a, 106531, void 0, {
layer: 4,
parentLayer: 0
});
this.acceptVe_ = RN(a, {
veType: 104841
}, void 0, 4);
this.expressVe_ = RN(a, {
veType: 105964
}, void 0, 4)
},
createLightbox_: function () {
var a = document.createElement("ytd-consent-bump-lightbox");
a.id = "consent-bump";
document.body.appendChild(a);
this.data && this.data.forceConsent ? (a.getDialog().modal = !0, z("mandatory_consent_bump") && (a.getDialog().style.maxHeight = "550px")) : a.getDialog().withBackdrop = !0;
this.fire("yt-add-element-to-app", a);
return a
},
getConsentBumpIcon_: function (a) {
return a.toLowerCase()
},
onReceivedMessage_: function (a) {
if (!this.lightbox_) {
var b = this.getLightbox_();
if (b)
this.lightbox_ = b;
else
return
}
b = Md(a.origin);
if (WLa[b] && WLa.hasOwnProperty(b) || Gd("consent_url_override"))
switch ((b = kn(this.getScreenLayer())) && ("cb-ui-done-early" === a.data && this.acceptVe_ ? $K(b, this.acceptVe_) : "cb-express-done" === a.data && this.expressVe_ && $K(b, this.expressVe_)), a.data) {
case "cb-ui-done-early":
case "cb-ui-done":
case "cb-express-done":
case "cb-already-consented":
this.hideConsentBump_();
case "cb-user-closed":
this.lightbox_.getDialog().close();
this.resumePlayer_();
break;
case "verify-origin":
a.source.parent == window && a.source.postMessage("verify-origin-reply", a.origin);
}
},
onRemindMeLaterTap_: function () {
ol("HideTicker", "true", 86400);
this.hideConsentBump_()
},
onReviewTap_: function () {
this.pausePlayer_();
this.openLightbox_()
},
openLightbox_: function () {
var a = kn(this.getScreenLayer());
a && (this.acceptVe_ && YK(a, [this.acceptVe_]), this.expressVe_ && z("mandatory_consent_bump") && YK(a, [this.expressVe_]));
(a = this.getLightbox_()) || (a = this.createLightbox_());
a.getIframe().src = this.data.iframeUrl;
this.lightbox_ = a;
a.getDialog().open()
},
pausePlayer_: function () {
var a = WO(this);
a && a.pause()
},
hideConsentBump_: function () {
this.hidden = !0;
this.fire("yt-consent-bump-display-changed")
},
resumePlayer_: function () {
var a = WO(this);
a && a.play()
},
getLightbox_: function () {
var a = document.querySelector("ytd-app") || document.querySelector("ytg-app");
return a ? a.querySelector("#consent-bump") : null
},
forceShowIfNoBlockingSigninPrompt: function () {
var a = this.sendAction("yt-get-popup-opened-action", ["yt-upsell-dialog-renderer"]);
0 !== a.length && a[0] || this.handlePopupClose_("yt-upsell-dialog-renderer")
},
get _template() {
if (!this.__$tmpl) {
this.__$tmpl = document.createElement("template");
this.__$tmpl.innerHTML = "<!--css-build:shady-->\n \n \n <yt-icon id=\"consent-shield\" icon=\"yt-icons:[[getConsentBumpIcon_(data.securityIcon.iconType)]]\" class=\"style-scope ytd-consent-bump-renderer\">\n </yt-icon>\n <yt-formatted-string id=\"alert-message\" text=\"[[data.alertMessage]]\" class=\"style-scope ytd-consent-bump-renderer\">\n </yt-formatted-string>\n <ytd-button-renderer id=\"remind-me-later-button\" data=\"[[data.remindMeLaterButton.buttonRenderer]]\" on-tap=\"onRemindMeLaterTap_\" class=\"style-scope ytd-consent-bump-renderer\">\n </ytd-button-renderer>\n <ytd-button-renderer id=\"review-button\" data=\"[[data.reviewButton.buttonRenderer]]\" on-tap=\"onReviewTap_\" class=\"style-scope ytd-consent-bump-renderer\">\n </ytd-button-renderer>\n "
}
return this.__$tmpl
},
set _template(v) {
this.__$tmpl = v
}
}); x-posted from yourduskquibbles/webannoyances#245 (comment) |
@Yaron10 try this: #7636 (comment) youtube.com##+js(set, yt_logging_screen, undefined) |
Thank you. The prompt appears intermittently. Now it's NOT showing. :) |
Sadly it does not work. |
Simply click |
Many people too fast clear cookies (e.g. on close YT tabs / browser windows), so that pop-up and/or overlay above player is visible too many as YouTube recommend. |
Not sure if this is exactly the same thing but I've recently seen two prompts.
They appear to both be controlled by I wasn't able to create a filter that worked nicely as any visual filter still results in a paused video. I managed to get the consent form to go away with a Fiddler script, I think the "Sign in" prompt would also go away with this edit but I'm no longer being served it so I cannot test. Maybe this code could be brought forward to uBlock if edits like this are possible? It should also be noted that you will be served the same "CONSENT" cookie, even after clearing your cookies. Some very nasty tracking going on there? |
How this works with browser (e.g. Chrome / Firefox) by |
Maybe it will be easier to completely "broke" these experiments? |
By watch only vimeo / dailymotion / twitch or on only embedded versions of videos? |
By scriptlets. I have problems even reading YT source on my PC, it's so large :( |
For the "Sign in to YouTube" dialog this userResourcesLocation script might work (annoyingly I can't get userResourcesLocation to work for me for some reason...) |
Bad url, use this: https://gist.githubusercontent.com/pixeltris/b79707fa8a704e0058c7f1af83d5935a/raw/Yt.js # Hide "Sign in to YouTube" dialog
youtube-dialog.js application/javascript
(function() {
var domReady = function(ev) {
if ( ev ) {
document.removeEventListener(ev.type, domReady);
}
if (window["ytInitialPlayerResponse"]?.auxiliaryUi?.messageRenderers?.upsellDialogRenderer != null) {
window["ytInitialPlayerResponse"].auxiliaryUi.messageRenderers.upsellDialogRenderer.isVisible = false;
}
};
if ( document.readyState === 'loading' ) {
document.addEventListener('DOMContentLoaded', domReady);
} else {
domReady();
}
})(); |
There shouldn't be much difference in those two urls right? One picks up the master and one is a specific revision? Either way I can't get any to work, I can't even get a simple |
@pixeltris Why not just use |
Beacause AdGuard also like: ! pussyspace.com,pussyspace.net - ads from ExoLoader on extensions
pussyspace.com,pussyspace.net#%#AG_defineProperty('exoDocumentProtocol', { value: window.document.location.protocol }); |
Your no show new commits added on your secret gist, so can down fast if need many updates. |
@uBlock-user ah that seems to work, thanks. Might still need a script though. There's another "consent" popup (similar to google's consent popup). Setting a cookie similar to |
AdGuard bake " google.*,youtube.com#%#(function(){try{var b=(new Date).getTime(),c=new Date(b+1314E6),a=location.host;a.startsWith("google.")||a.startsWith("youtube.")||(locSubString=a.substring(a.indexOf(".")+1));loc=locSubString||a;document.cookie="CONSENT=YES+; domain="+loc+"; path=/; expires="+c.toUTCString()}catch(d){}})(); (function() {
try {
var b = (new Date).getTime(),
c = new Date(b + 1314E6),
a = location.host;
a.startsWith("google.") || a.startsWith("youtube.") || (locSubString = a.substring(a.indexOf(".") + 1));
loc = locSubString || a;
document.cookie = "CONSENT=YES+; domain=" + loc + "; path=/; expires=" + c.toUTCString()
} catch (d) {}
})(); Also no recommend clicker into button as safe for Google/YouTube (but click "accept" on many other pages). |
The following seems to work to disable the consent popup (may not work on non-desktop platforms i.e. "desktopTopbarRenderer"). There are a few other code paths which can trigger that consent popup, but there are similar settings that can be toggled to stop them (but I haven't hit those code paths to confirm they are correct).
Does anyone know of a country/IP which would trigger the "Get the best YouTube experience" thing? |
@yourduskquibbles / @randomcookiemonster / @Yaron10 test: #7842 (comment) + #7842 (comment) @THEtomaso - you have "Get the Best experience" overlay (?) - not pop-up with Key hole~! If you have, so try:
on Pale Moon / ungoogled-chromium. |
I imagine "Get the best YouTube experience" will be it's own separate thing, but it might be another thing listed under |
How does |
No. |
Videos are pulled by AJAX fetch requests on YT, so the scriptlet is not inserted as the root document request is not fired. uBO inserts the scriptlet at the very earliest when a document request is fired. |
The issue with stopping videos finally seems to have been solved in AdGuard Annoyances filter now!! |
Nope, disabled:
In about an hour or so, you will see this after updating the list. AdguardTeam/AdguardFilters@72f49b2 - shame:
|
I've got no idea as to what you're talking about, krystian3w. These rules definitely fixes the problem at my end (uBO Legacy editions)!:
They're your rules, right? |
@THEtomaso Do you need both ? |
AdGuard sitll no fixed very old bug "uBlockOrigin/uBlock-issues#156", how long no repair - how long you need manually copy:
becasue this commit disable filter in AG Annoyance: AdguardTeam/AdguardFilters@72f49b2 |
Actually, they only seem to solve the issue, when combined with other rule(s), found in uBO Filters, or elsewhere. -- EDIT: |
The former of the two rules has been removed now, and simply restoring it under "My filters" doesn't do the trick. |
So to clarify: "Sign in to YouTube" dialog is controlled via The consent dialog is controlled via |
Hiding this Sign in request prevents using the search on Youtube. |
Using |
How reproduce broken search bar?
|
My bad, it's ok now. |
URL(s) where the issue occurs
https://www.youtube.com/watch?v=dHrd54S_FYQ
Describe the issue
A new "Sign In" request appears on many YouTube videos if you're not signed in.
Screenshot(s)
Versions
The text was updated successfully, but these errors were encountered: