-
Notifications
You must be signed in to change notification settings - Fork 30
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
Fix 'prevent-element-src-loading' — broken website #264
Comments
moned to #276 |
…G-18039 Merge in ADGUARD-FILTERS/scriptlets from fix/AG-18039 to master Squashed commit of the following: commit 96727f7 Merge: c95c2eb 5e74b91 Author: Stanislav A <[email protected]> Date: Tue Dec 6 17:13:56 2022 +0300 Merge branch 'master' into fix/AG-18039 commit c95c2eb Merge: 30649fd bb4c801 Author: Stanislav A <[email protected]> Date: Tue Dec 6 17:06:33 2022 +0300 Merge branch 'master' into fix/AG-18039 commit 30649fd Merge: abb1f95 c98787f Author: Stanislav A <[email protected]> Date: Tue Dec 6 16:51:24 2022 +0300 Merge branch 'master' into fix/AG-18039 commit abb1f95 Author: Stanislav A <[email protected]> Date: Tue Dec 6 16:05:28 2022 +0300 fix prevent-element-src-loading thisArg.getAttribute TypeError
If I understand correctly issue with incorrect blocking has been fixed. |
yes, only incorrect blocking is fixed. the issue should be opened due to other tasks. so better to create separate issues for different problems in future |
prevent-element-src-loading
Related issue - AdguardTeam/AdguardFilters#136501
It looks like that scriptlet doesn't work correctly and it breaks website.
Screenshot
As far as I understand, the problem is in this line:
Scriptlets/src/scriptlets/prevent-element-src-loading.js
Line 173 in 202f6d8
thisArg
sometimes doesn't havegetAttribute
method and it throws error.So, I guess that checking if
getAttribute
is a function, for example, by something like this:should fixes this issue.
By the way, it looks like that this issue - #228 is not fixed or I'm doing something wrong.
I have checked it here - https://jsfiddle.net/ofzmtek3/
Additional notes.
It seems that it happens only with latest nightly build for Windows (7.12 nightly 1 (build 4121, CL 1.10.154)), because (if I'm not wrong) other versions do not use latest scriptlets library yet.
The text was updated successfully, but these errors were encountered: