Closed Yaron10 closed 4 years ago
@yourduskquibbles / @randomcookiemonster
https://github.com/yourduskquibbles/webannoyances/issues/245#issuecomment-682655559
Here's a screenshot, though I probably shouldn't have cropped it: https://imgur.com/a/4Q6B158
@krystian3w,
Thank you.
I hope it does not require reaching for it: nanop-click-elements-onready.js
@uBlock-user,
It appears intermittently. Allow cookies for YouTube and close/restart Firefox a few times.
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 https://www.youtube.com/s/desktop/5068772e/jsbin/desktop_polymer_inlined_html_polymer_flags.vflset/desktop_polymer_inlined_html_polymer_flags.js
You can use ctrl + f and search for Polymer({is:"ytd-consent-bump-renderer"
to find in the source but I don't know enough js/script defusers to know if it is able to be defused though?
x-posted from https://github.com/yourduskquibbles/webannoyances/issues/245#issuecomment-685989183
@Yaron10 try this: https://github.com/uBlockOrigin/uAssets/issues/7636#issuecomment-687200509
youtube.com##+js(set, yt_logging_screen, undefined)
@krystian3w,
Thank you.
The prompt appears intermittently. Now it's NOT showing. :) I'll try again and report back.
@krystian3w,
Sadly it does not work.
Simply click Not now
(from 1st party YT), why filters for that?
If anyone wants to sign in for watching and if you add filters for that, they will not see this prompt (which is 1st party)
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.
1) A prompt with text "Sign in to YouTube" with the options "NO THANKS" / "SIGN IN". 2) A consent form similar to Google's "Before you continue".
They appear to both be controlled by desktop_polymer_inlined_html_polymer_flags.js
. From what I can tell the main html page states if "Sign in" should be used via the settings "kevlar_sign_in_prompt_before_mandatory_consent":true
and kevlar_sign_in_prompt_before_mandatory_consent=true
. That setting is listed under serializedExperimentFlags
(might eventually be fully adapted to all users, maybe not). The consent form is called via maybeForceConsent_
. I'm not 100% sure on path of execution that hits that point though.
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 .NET
framework? No better convert this into .user.js
and publish on greasyfork as long no possible convert to e.g. set-constant
/ abort-on-property-read
?
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 console.log
to work :(
@pixeltris youtube.com##+js(set, ytInitialPlayerResponse.auxiliaryUi.messageRenderers.upsellDialogRenderer.isVisible, false)
Why not just use set
instead as you're trying to set a value after all ?
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 });
There shouldn't be much difference in those two urls right?
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 CONSENT=YES+GB.en
seems to resolve this. Maybe there's another workaround, I'll poke around some more.
AdGuard bake "CONSENT=YES+GB.en
":
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).
youtube.com##+js(set, ytInitialData.topbar.desktopTopbarRenderer.interstitial.consentBumpRenderer.forceConsent, false)
Does anyone know of a country/IP which would trigger the "Get the best YouTube experience" thing?
@yourduskquibbles / @randomcookiemonster / @Yaron10 test:
https://github.com/uBlockOrigin/uAssets/issues/7842#issuecomment-694311598 + https://github.com/uBlockOrigin/uAssets/issues/7842#issuecomment-694394240
@THEtomaso - you have "Get the Best experience" overlay (?) - not pop-up with Key hole~!
If you have, so try:
youtube.com##+js(set-constant.js, ytInitialPlayerResponse.auxiliaryUi.messageRenderers.upsellDialogRenderer.isVisible, false)
youtube.com##+js(set-constant.js, ytInitialData.topbar.desktopTopbarRenderer.interstitial.consentBumpRenderer.forceConsent, false)
on Pale Moon / ungoogled-chromium.
⚠️ no longer safe ⚠️ - these break load homepage.
I imagine "Get the best YouTube experience" will be it's own separate thing, but it might be another thing listed under messageRenderers
.
How does youtube.com##+js
work exactly? When clicking videos I think youtube loads the pages without actually redirecting? Therefore when the new page loads I don't think it triggers the youtube.com##+js
thing again? Resulting in the consent popup.
you have "Get the Best experience" overlay (?)
No.
When clicking videos I think youtube loads the pages without actually redirecting?
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!! :tada:
Nope, disabled:
youtube.com##+js(set-constant.js, ytInitialPlayerResponse.auxiliaryUi.messageRenderers.upsellDialogRenderer.isVisible, false)
In about an hour or so, you will see this after updating the list.
https://github.com/AdguardTeam/AdguardFilters/commit/72f49b2faab17307812c7047c1446adb950bacc2 - shame:
Alex-302 and:
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)!:
youtube.com##+js(set-constant.js, ytInitialPlayerResponse.auxiliaryUi.messageRenderers.upsellDialogRenderer.isVisible, false)
youtube.com##+js(set-constant.js, ytInitialData.topbar.desktopTopbarRenderer.interstitial.consentBumpRenderer.forceConsent, false)
They're your rules, right?
@THEtomaso Do you need both ?
AdGuard sitll no fixed very old bug "https://github.com/uBlockOrigin/uBlock-issues/issues/156", how long no repair - how long you need manually copy:
youtube.com##+js(set-constant.js, ytInitialPlayerResponse.auxiliaryUi.messageRenderers.upsellDialogRenderer.isVisible, false)
becasue this commit disable filter in AG Annoyance: https://github.com/AdguardTeam/AdguardFilters/commit/72f49b2faab17307812c7047c1446adb950bacc2
Do you need both ?
Actually, they only seem to solve the issue, when combined with other rule(s), found in uBO Filters, or elsewhere. It requires further testing, to derminine what exactly.
--
EDIT: There are a shitload of rules being applied, at my end. It will be very difficult to find the "magic" combination.
Who added:
youtube.com##+js(set-constant.js, ytInitialData.topbar.desktopTopbarRenderer.interstitial.consentBumpRenderer.forceConsent, false)
into uBO filters?
this block GDPR:
The former of the two rules has been removed now, and simply restoring it under "My filters" doesn't do the trick. Any idea what else was removed?? I'm sure I had a working combo there, for a while!!
So to clarify:
"Sign in to YouTube" dialog is controlled via ytInitialPlayerResponse.auxiliaryUi.messageRenderers.upsellDialogRenderer.isVisible
. I think the reason why it was briefly added then removed from Adguard Annoyances is because not everyone is served that path, which means when setting just isVisible
it possibly created a corrupted state and stops videos from loading? https://github.com/AdguardTeam/AdguardFilters/issues/63741#issuecomment-694934874 maybe setting upsellDialogRenderer
to null might be an alternative? Not 100% sure.
The consent dialog is controlled via ytInitialData.topbar.desktopTopbarRenderer.interstitial.consentBumpRenderer.forceConsent
. The problem with this one is that when navigating to other videos forceConsent
value is wiped over, so you will see the popup at that point. Setting a cookie CONSENT=YES+
is also another alternative to stopping this dialog.
Hiding this Sign in request prevents using the search on Youtube.
Using www.youtube.com##.opened
is ok, except that video is always paused so that we have to click triangle to start playback and that we can't use search - i don't ca about that, we can use google search for youtube search. About google: have you fund 100% working filters for "before you continue"?
How reproduce broken search bar?
filters search
list.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) ![תמונה](https://user-images.githubusercontent.com/10229320/91622121-5649c080-e99e-11ea-8c88-7fdf11c7dbe9.png)Versions