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

Only run in iframes, not on main site #238

Open
trlkly opened this issue Jun 5, 2024 · 0 comments
Open

Only run in iframes, not on main site #238

trlkly opened this issue Jun 5, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@trlkly
Copy link

trlkly commented Jun 5, 2024

What's the problem this feature will solve?

The extension loads even if you are directly on the YouTube website. And it is very noisy in the Console, creating multiple errors. It would be nice if the addon would fail silently if running outside of an iframe.

Describe the solution you'd like

Add the following to the top of the script:

if (location.href.includes('/embed/') == false) { return; }

(Yes, I know I could make a pull request, but that is more complicated than a bug request.)

Additional context

No response

@trlkly trlkly added the enhancement New feature or request label Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant