Обговорення » Розробка

Generic user-exclusion for embeds

§
Опубліковано: 21.03.2025
Edited: 21.03.2025

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.

§
Опубліковано: 22.03.2025

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.

§
Опубліковано: 22.03.2025
Edited: 22.03.2025

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.

Опублікувати відповідь

Sign in to post a reply.