You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the implementation of scriptlet injection for cosmetic filters is done using the insertScript API, which is sandboxed from the main page. As a result, scriptlets that rely on intercepting method calls on the global window object don't do anything.
uBlock Origin's implementation injects scriptlets by creating a global script HTML element with the scriptlet as the text content, inserting it to the DOM, and immediately removing it after execution. This approach should provide better compatibility.
The text was updated successfully, but these errors were encountered:
Verified Paid promotion links are shown on current release build 1.8.95
Verified Paid Promotion links are removed on 1.9.62
Verification passed on
Brave | 1.9.62 Chromium: 81.0.4044.138 (Official Build) dev (64-bit)
-- | --
Revision | 8c6c7ba89cc9453625af54f11fd83179e23450fa-refs/branch-heads/4044@{#999}
OS | Windows 10 OS Version 1803 (Build 17134.1006)
rebron
changed the title
Cosmetic filter scriptlet injection fails to modify window attributes
Allow modification of window attributes with scriptlets
May 20, 2020
Currently, the implementation of scriptlet injection for cosmetic filters is done using the
insertScript
API, which is sandboxed from the main page. As a result, scriptlets that rely on intercepting method calls on the globalwindow
object don't do anything.uBlock Origin's implementation injects scriptlets by creating a global
script
HTML element with the scriptlet as the text content, inserting it to the DOM, and immediately removing it after execution. This approach should provide better compatibility.The text was updated successfully, but these errors were encountered: