12

While native Safari content blocker does not support scriptlets, they are very essential for holistic ad blocking capability.

Herein, Orion can use the approach of AdGuard. The supported rules are processed by Safari content blocker, whereas the advanced filters are injected by AdGuard directly into the webpage.

  • Vlad replied to this.

    joystmp Bit more informationexamples of what scriplets are, what is the use case etc would be helpful

      Vlad

      Scriptlet is a javascript function that provides extended capabilities for content blocking. Scriptlets are necessary because native Safari filters are very limited in scope and cannot block everything.

      Both adguard and ublock origin relies heavily on the use of scriplets. The scriptlets supported by them are available in their respective repositories - https://github.com/AdguardTeam/Scriptlets and https://github.com/gorhill/uBlock/wiki/Resources-Library

      Adguard filters, IMHO best filters there are currently, has significant number of scriptlets (eg. base, annoyances, etc.). They can be searched using +js.

      Brave browser also supported uBO's scriptlets in its native adblock engine - https://github.com/brave/adblock-rust, https://github.com/brave/adblock-resources.

      Adguard uses //scriptlet syntax whereas uBO and Brave use +js

        Adguard has also published swift library that converts AdGuard rules to Safari content blocking rules

          What blocklists would this allow Orion to use, by default, and what block lists should these replace?

            Vlad

            I've noticed that Orion ships with extra lists and custom rules to achieve 100% on adblock tests.

            AdGuard Base and AdGuard Tracking Protection filter are more than enough to achieve 100% on any adblock test.

            Moreover, EasyList and EasyPrivacy lists, although popular, are not updated as quickly as they should be. This should give you an idea about the rate of activity and updates in adguard filters

            • Vlad replied to this.
              8 days later

              joystmp With these two installed I am getting everywhere (for example CNN). It also gets only 64% on adblock test?

              Can you verify if this is an Orion problem or adguard problem?

                Vlad

                The 2 filter lists I mentioned are optimized filters (smaller size, while trying to maximise blocking). With just these 2, in Brave + uBO, I am getting 86% blocking.

                I forgot to mention mobile ads filter (optimised). With these 3 enabled, I am getting 95%.

                If I add full version of these 3 lists (just remove _optimized from the url), I get 99% (ads-sg.tiktok.com not blocked).

                Rules count:
                In full version - 180,150 network filters + 82,974 cosmetic filters
                In optimized version - 132,915 network filters + 42,571 cosmetic filters

                  Vlad
                  Note that AdGuard provides separate filter lists for AdGuard and uBO since the scriptlets syntax for both are different.

                  • Vlad replied to this.

                    joystmp I am referring to this

                    AdGuard Base and AdGuard Tracking Protection filter are more than enough to achieve 100% on any adblock test.

                    This seems not to be the case?

                    Happy to run 'optimized' lists, just please be specific what those lists are to achieve 100%?

                      Vlad This seems not to be the case?

                      I did not factor in NextDNS running in the background.

                      Vlad Happy to run 'optimized' lists, just please be specific what those lists are to achieve 100%?

                      Optimized lists may not always give 100% result. However, 3 full lists (list1, list2, list3) as shown above are alreadying blocking all except 1, for which I've already created an issue on github.

                      Update: Adguard refused to block ads-sg.tiktok.com since it is not related to ads.

                        a month later

                        It'll be very nice to achieve this kind of content blocking with the ability to manage filters and userscripts on ios.

                        edited

                          8 months later
                          2 months later
                          14 days later

                          since the update to 1.3.18 (6) (WebKit 8620.2.4.10.7) scriplets in content blocker seem not to work.
                          The Adguard's filterlists that were present as selectable are now disappeared.
                          Is this intended or do I need to open a bug report?

                          • laiz replied to this.

                            chorizo
                            I believe this was mistakenly markedDone and I have pinged the team to fix the tags. Scriptlet support is not currently available on either platform but we understand the demand for it and it will be implemented as soon as resources permit the team to do so.

                              laiz ok then something happened with the adguard rule converter library in this update because adguard's filterlists are no longer effective, the empty spaces leaved by the not loaded ads now are visible

                                No one is typing