💔 [Malformed]: scriptlets compatibility with AdGuard
I also wanted to ask if these scriptlets are still compatible with adguard mobile as you have stated here https://github.com/the-advoid/ad-void/issues/3063#issuecomment-2403690877
.. because even without these changes you made for bbc, I was still able to browse bbc normally on my phone with the latest adguard nightly. Ideally just like desktop it shouldn't also have been working there too right?
Adguard mobile doesn't show scriptlets working in the log otherwise it would have been easier to debug.
Originally posted by @Rtizer-9 in #3070
Investigate and test compatibility of scriptlets with AdGuard.
@Rtizer-9, unfortunately I could not reproduce the issue, at least in the AdGuard extension for Chromium-based browsers, I don't use AdGuard on my phone anymore. What I did notice is that I needed to mark the filter list as trusted in order for the scriptlets to actually work. Maybe that's a part of the problem you're facing? And the AdGuard extension also doesn't show that the scriplets are actually working, I tested them manually and they are executed and set the appropriate consts/vars.
I'm strictly talking about the adguard mobile app not browser extension.
In adguard app there we can add either
- filterlists which mostly require local/remote file ending with txt and
- "extension" for which userscripts/userstyles are required ending with js extension.
Since this filterlist work perfectly with uBO in custom filter lists section, I added it in adguard filter lists and the extension doesn't even accepts because of no js extension. I mean all this is obvious but just clarifying. And yes the filterlist is trusted and it even shows 46 rules loaded.
Is there any other way we can verify if it's working. I mean the first point still stands, let's say it's already working but then why was I able to browse bbc unlike desktop.
Hi, @Rtizer-9, I finally found some time to inspect the issue. The issue is this, AdGuard does support both syntaxes, the uBlock one (the one used in my scriptlets) and its own but the issue is with its compatibility. AdGuard only supports setting primitives (like Booleans used in my scriplets), those work, but objects and functions don't, thus, making the scriplets working only partially. That's why for me it worked and for you it didn't - it depends on the site.
As you can see, I have the scriplet enabled and one can check its working state by going to the developers' tools of a browser and check whether the const/vars are set. Again, only primitives work. Unfortunately, there is no reliable way of making the scriplets that set objects/function work in AdGuard, its scriplets are less powerful/permissive than the ones in uBlock. Even if there is a way, it would render the scriplet incompatible for both syntaxes.
We can discuss and brainstorm this further or close the issue, if you are okay with that.
I mean just like uBO is the gold standard on desktop or with browsers with extension support, adguard is the gold standard of smartphone and obviously lots of people use the full fledged desktop app too so ideally the scriptlet should support both of them.
Let's keep it open and ask adguard devs for some help to make things compatible.
I've seen numerous times in their changelogs, entries such as "now it also supports uBO function". So most probably this will also be supported. I'll open the issue.
Thanks for taking time out 😇
I mean just like uBO is the gold standard on desktop or with browsers with extension support, adguard is the gold standard of smartphone and obviously lots of people use the full fledged desktop app too so ideally the scriptlet should support both of them.
Let's keep it open and ask adguard devs for some help to make things compatible.
I've seen numerous times in their changelogs, entries such as "now it also supports uBO function". So most probably this will also be supported. I'll open the issue.
Thanks for taking time out 😇
Good to know, let's hope they do so. If you do open an issue there, please, post a link to it here.
Hi, so I'll open the issue in a few hours but would you like to suggest what exactly we should be asking them to support - the issue title and body?
Hi, so I'll open the issue in a few hours but would you like to suggest what exactly we should be asking them to support - the issue title and body?
Actually, what do you think about the idea that I open an issue for it since I am the author of the mentioned scriplet? We might get more luck that way and I could provide them with valid examples/samples and reasoning. What's your take on that? And if you don't mind, in which repo should I do it?
I was actually about to suggest the same thing. This is obviously the right thing to do.
Repo should be corelibs.
https://github.com/AdguardTeam/CoreLibs
I was actually about to suggest the same thing. This is obviously the right thing to do.
Repo should be corelibs.
@Rtizer-9, thank you for your time for noticing the original issue and for the link, I'll collect all the needed data for their devs and open an issue in the repo. 😀