Skip to content
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

Embedded videos not being unlocked [Greasemonkey] #94

Open
SephirothWS opened this issue Nov 12, 2021 · 14 comments
Open

Embedded videos not being unlocked [Greasemonkey] #94

SephirothWS opened this issue Nov 12, 2021 · 14 comments
Labels
bug Something isn't working can't fix

Comments

@SephirothWS
Copy link

SephirothWS commented Nov 12, 2021

Test video: https://forums.warframe.com/topic/1286241-thanks-for-watching-prime-time-292/#comment-12332841

Still forced to watch on Youtube despite installing Tampermonkey Greasemonkey & the userscript on Firefox 93.

image

@zerodytrash
Copy link
Owner

Works fine for me. Maybe youtube behaves differently for you. Depending on the country, youtube enforces different restrictions.
Can you try debugging the script to find out what the problem is in your case? i can't reproduce it.

image

@SephirothWS
Copy link
Author

SephirothWS commented Nov 13, 2021

How would I debug the script? Total newb to this.

Nevermind, I'm an idiot, I thought I was using Tampermonkey, turns out I was running greasemonkey instead. ... Been meaning honestly to migrate over to Tampermonkey, so I just exported->imported from one to the other, and the script is operating in Tampermonkey like you say. ... ... Guess I found a problem with Greasemonkey for Firefox, ... but as a not-so-technical-saavy user with zero knowledge and experience with Javascript, I cannot for the life of me figure out how I would debug this in Greasemonkey.

@zerodytrash
Copy link
Owner

Okay, i was able to reproduce this bug in Firefox + Greasemonkey.
Thanks for reporting.

@zerodytrash zerodytrash changed the title Embedded Videos still not unlocked Embedded Videos still not unlocked [Greasemonkey] Nov 13, 2021
@zerodytrash zerodytrash added the bug Something isn't working label Nov 13, 2021
@drunkwinter
Copy link
Collaborator

Seems like we either don't have access to the window object or we somehow run before the iframe has loaded the window object.

@drunkwinter drunkwinter changed the title Embedded Videos still not unlocked [Greasemonkey] Embedded videos not being unlocked [Greasemonkey] Dec 20, 2021
@drunkwinter drunkwinter added the not planned This will not be worked on for now label Jan 5, 2022
@ghost
Copy link

ghost commented Apr 1, 2022

The above mentioned video runs correctly, handled here with the Simple YouTube Age Restriction Bypass script ver. 2.4.6, managed by Violentmonkey.

Have you tried setting hereafter to false (default=true) ?

// User needs to confirm the unlock process on embedded player?
const ENABLE_UNLOCK_CONFIRMATION_EMBED = false;

In my case false is required for age-restricted embedded YT videos, otherwise the script doesn't make it.
Also, if you're a uBlock Origin user you may need to add to My Rules (depending on your uBO settings):

youtube.com phx.4everproxy.com * noop
youtube.com youtube-proxy.zerody.one * noop

@zerodytrash zerodytrash added can't fix greasemonkey restriction and removed not planned This will not be worked on for now labels Jun 22, 2022
@trlkly
Copy link

trlkly commented Jul 29, 2022

It looks like you at least attempt a workaround for in the userscript, by injecting the code into eval. Did that not fix the issue?

If not, then what about more standard techniques such as using either @grant unsafewindow or wrappedJSObject? I usually see most scripts start with

let window = window || unsafeWindow || window.wrappedJSObject

@zerodytrash
Copy link
Owner

It looks like you at least attempt a workaround for in the userscript, by injecting the code into eval. Did that not fix the issue?

Nope.

If not, then what about more standard techniques such as using either @grant unsafewindow or wrappedJSObject? I usually see most scripts start with

I will try it out. Thank you.

@JVSkellington
Copy link

This worked for reddit, at least with the old style interface activated, didn't tested with the new one. image

@drunkwinter
Copy link
Collaborator

drunkwinter commented Oct 12, 2022

This issue has been here for 5 years and there is absolutely nothing we can do about it. See greasemonkey/greasemonkey#2574

I do not think this will be fixed anytime soon on Greasemoney's side. Also the extension hasn't been updated in over 2 years now. The best we can do is drop support and encourage people to use other managers out there. We could also finally get rid of the hacky eval injection that we currently use. Just an opinion.

@tsilvs
Copy link

tsilvs commented Nov 21, 2022

@drunkwinter which alternative managers do you recommend? Violentmonkey maybe?

@drunkwinter
Copy link
Collaborator

@drunkwinter which alternative managers do you recommend? Violentmonkey maybe?

Tampermonkey and Violentmonkey are pretty good. There are probably more out there which are new and updated regularly. Personally I use Violentmonkey.

@lbmaian
Copy link

lbmaian commented Dec 25, 2022

On Chrome and Tampermonkey, I had to set ENABLE_UNLOCK_CONFIRMATION_EMBED to false for this to work in embeds.
Considering I'll have to do this every time this script updates, can this flag effectively always be false by default for embeds?

@drunkwinter
Copy link
Collaborator

On Chrome and Tampermonkey, I had to set ENABLE_UNLOCK_CONFIRMATION_EMBED to false for this to work in embeds. Considering I'll have to do this every time this script updates, can this flag effectively always be false by default for embeds?

This sounds like some other bug. Could you file a bug report please? Would like to take a look at it.

@lbmaian
Copy link

lbmaian commented Dec 25, 2022

Sorry false alarm - the "click to unlock" was being overlapped by "more videos on youtube" cards.
So I suppose it's an issue for small enough embeds where those cards appear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working can't fix
Projects
None yet
Development

No branches or pull requests

7 participants