Navigation

    • Register
    • Login
    • Search
    • Categories
    • Recent

    Feature: Safari 9+ - ContentExtensions content

    Cookie 5
    2
    6
    1974
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      mag last edited by SweetP

      Hello,
      not sure if that would be appropriate for the Cookie app to be able to handle this, but please try to have a look at it if it would be feasible...

      As You know, there's a new API for content blocking extensions since Safari 9.0.
      Extensions that make use of that API don't seem to store their data in the usual browser local storage (which Your Cookie app can manage), but in the following locations instead:
      Safari: ~/Library/WebKit/com.apple.Safari/ContentExtensions/
      Safari TP: ~/Library/WebKit/com.apple.SafariTechnologyPreview/ContentExtensions/

      AdGuard Browser Extension https://github.com/AdguardTeam/AdguardBrowserExtension/releases is one such example - it seems to generate and store its blockinglist into the above mentioned location and then uses that together with its settings which are stored in:
      Safari: ~/Library/Preferences/com.apple.Safari.Extensions.plist
      Safari TP: ~/Library/Preferences/com.apple.SafariTechnologyPreview.Extensions.plist
      e.g. storing nothing in the browser local storage at all.

      It would be nice to be able to manage that stuff in Your app as well.

      Some possibly interesting resources regarding the content blocking API:
      https://webkit.org/blog/3476/content-blockers-first-look/
      http://trac.webkit.org/browser/trunk/Source/WebCore/contentextensions
      https://developer.apple.com/library/safari/documentation/Tools/Conceptual/SafariExtensionGuide/BlockingContent/blockingcontent.html#//apple_ref/doc/uid/TP40009977-CH24-SW4
      https://developer.apple.com/library/safari/documentation/Extensions/Conceptual/ContentBlockingRules/Introduction/Introduction.html#//apple_ref/doc/uid/TP40016265

      1 Reply Last reply Reply Quote 0
      • SweetP
        SweetP last edited by

        this seems like a good fit,
        once v5.0.4 is released, Ill take a look at this for 5.0.5/5.1

        1 Reply Last reply Reply Quote 0
        • SweetP
          SweetP last edited by

          do you know of any other extensions which store data in these locations?
          most likely just ad blockers i guess

          1 Reply Last reply Reply Quote 0
          • M
            mag last edited by

            Yes, currently only ad blockers it seems, though the author of the JS Blocker extension said he may consider using that API in the future (if the restrictions of the filter list size - currently 50000 entries AFAIK - are improved).

            These 2 have their sources easily available:
            Nope https://github.com/kaishin/Nope
            Ka-Block https://github.com/dgraham/Ka-Block

            Then I found few others
            Wipr http://www.giorgiocalderolla.com/wipr.html
            Adamant http://cocoaapp.com/adamant/
            Roadblock http://www.obiedcorner.com/roadblock/
            NoThirdParty http://nothirdparty.net/

            1 Reply Last reply Reply Quote 0
            • SweetP
              SweetP last edited by

              cool thanks!

              Ive added preliminary support, ill test against these extensions in the morning. and release a beta tomorrow night perhaps.

              thanks for the help.

              <edit>Im not parsing the data contained in the files, just displaying them.</edit>

              1 Reply Last reply Reply Quote 0
              • SweetP
                SweetP last edited by

                I just posted a beta with support for ContentExtension data
                https://sweetpproductions.com/support/showthread.php?tid=340&pid=1144#pid1144

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post