-
Notifications
You must be signed in to change notification settings - Fork 143
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
Add Youtube wall popup to v10 #1387
Conversation
Initial @kalinme testing failed. |
window.addEventListener('yt-navigate-start', () => closeIframe(), true); | ||
|
||
detectWall(async () => { | ||
if (await isFeatureDisabled()) return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
YT page is long living app, so the condition must be checked each time - not only at startup (applies to v8 & v10).
66a6514
to
ec77e51
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
packages/ui
showIframe
to detect if the iframe is already showndetectWall
functionThe current logic detects changes in the DOM and checks if the URL has changed. If so, selectors for the wall are checked if exists, and then we trigger showing up the iframe. As the iframe blocks displaying more than once, it triggers each time the selectors are found.
For the notice, Safari
chrome.windows.create()
silently returns a resolved promise if the extension is not allowed in private mode. Thechrome.extension.inIncognitoContext
also always returnsfalse
.