Adguardforsafari: The scriptlet doesn't apply in iframe

Created on 29 Oct 2020  路  14Comments  路  Source: AdguardTeam/AdGuardForSafari

Related to the issue: https://github.com/AdguardTeam/AdguardFilters/issues/66095

#%#//scriptlet("abort-current-inline-script", "String.fromCharCode", "/emZnbG9hZGVk|break;case \$\./")

This and other scriptlets doesn't work in Safari f.e. on page https://gogoanime.so/boruto-naruto-next-generations-episode-16 for player gogo-stream.com in iframe (I tried this and other scriptlets from user rules too). But if I open gogo-stream.com/streaming.php?id=OTk1MjE=&title=Boruto%3A+Naruto+Next+Generations+Episode+16 in separate window - scriptlet works good (clickunder doesn't trigger)

Safari Version 14.0 (15610.1.28.1.9, 15610)
MacOS 10.15.7 (19H2) Catalina
AdGuard 1.8.2

Bug Medium Done Closed

All 14 comments

I think this is related to this issue too: https://github.com/AdguardTeam/AdGuardForSafari/issues/105

it's fixed already. @Sergey-Lyapin try v1.8.3-beta

Ok, thank you

@tvinzz
Looks like the problem still exists, please check the video:
https://drive.google.com/file/d/1FjmYLm8qcScOfSYOCv_dfS5Zd0fE70Qu/view?usp=sharing

still relevant in 1.8.5

@Mizzick any update here?

#%#//scriptlet('log', 'hello', 'world')
this one works fine, so I think it's fixed.

Oh, got it, let's close it then.

@Mizzick @ameshkov
I think it isn't fixed.

Try
disqus.com#%#//scriptlet('log', 'hello', 'world')

On Firefox (example):

https://disqus.com/ -> Yes
https://www.hdblog.it/hardware/recensioni/n530402/nvidia-geforce-rtx-3060-ti-test-benchmark-prezzo/ -> Yes

On Safari (example):

https://disqus.com/ -> Yes
https://www.hdblog.it/hardware/recensioni/n530402/nvidia-geforce-rtx-3060-ti-test-benchmark-prezzo/ -> Not

@Mizzick

Confirmed. The problem is that when safari.extension.dispatchMessage('getAdvancedBlockingData'); is called, Safari operates the URL of the top frame instead of the frame URL.

You should pass the frame URL in the parameter.

Regarding Disqus example, I doubt we can make it work in Safari due to this: Refused to execute a script because its hash, its nonce, or 'unsafe-inline' does not appear in the script-src directive of the Content Security Policy.

Other than that, the issue can be considered fixed.

Uhm ok..

However, there may be other cases, like YouTube:
youtube.com#%#//scriptlet('log', 'hello', 'world')

https://www.youtube.com/embed/kayaPmkZ9Kg -> Yes
https://andreagaleazzi.com/recensione/recensione-sony-xh90-85/ -> Not

Or Dplay:
dplay.com#%#//scriptlet('log', 'hello', 'world')

https://it.dplay.com/nove/fake-la-fabbrica-delle-notizie/stagione-3-episodio-5-porno-illegale-telegram/embed/ -> Yes
https://attivissimo.blogspot.com/2020/11/altre-due-puntate-di-fake-la-fabbrica.html -> Not

YT example works in 1.8.9

Yep, confirmed, they all work :)

Was this page helpful?
0 / 5 - 0 ratings