Discussions » Development

Generic user-exclusion for embeds

§
Posted: 2025-03-21
Edited: 2025-03-21

Just a request for info: I'ld hoping for a regex that can be added as a User-Exclude for certain scripts so that they do not trigger when an embedded object is found.

I'm currently using the one pointed in https://greasyfork.org/forum/discussion/71798/small-bug-with-embedded, but most sites nowadays are developed to avoid falling for such an easy filtering trap.

I wonder if a regex can be used, rather than manually modifying the scripts.

§
Posted: 2025-03-22

For "embedded" you mean sites loaded as IFrames, such as youtube videos when they are loaded inside another page?
If so, you can compare if the window where the script is loaded is non the top window:

if (window.top == window.self)
return;

In this case, the script will be loaded both in main windows or in iframes, but it will actually run only if it's loaded in the top window.

§
Posted: 2025-03-22
Edited: 2025-03-22

For "embedded" you mean sites loaded as IFrames, such as youtube videos when they are loaded inside another page?

Exactly the scenario.

https://greasyfork.org/en/scripts/32-show-password-onmouseover/discussions/4020#comment-583816

ahh so that means modifying the scripts. Okay I'll do it manually, but also put in requests to the individual authors to include that 'isEmbedded' code.

Post reply

Sign in to post a reply.