• Categories
  • Recent
Collapse

Feature: Safari 9+ - ContentExtensions content

Scheduled Pinned Locked Moved Cookie 5
6 Posts 2 Posters 2207 Views
    • 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 Offline
    M Offline
    mag
    wrote on last edited by SweetP
    #1

    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
    0
  • SweetPS Offline
    SweetPS Offline
    SweetP
    wrote on last edited by
    #2

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

    ~
    Russell
    SweetPProductions.com

    1 Reply Last reply
    0
  • SweetPS Offline
    SweetPS Offline
    SweetP
    wrote on last edited by
    #3

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

    ~
    Russell
    SweetPProductions.com

    1 Reply Last reply
    0
  • M Offline
    M Offline
    mag
    wrote on last edited by
    #4

    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
    0
  • SweetPS Offline
    SweetPS Offline
    SweetP
    wrote on last edited by
    #5

    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>

    ~
    Russell
    SweetPProductions.com

    1 Reply Last reply
    0
  • SweetPS Offline
    SweetPS Offline
    SweetP
    wrote on last edited by
    #6

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

    ~
    Russell
    SweetPProductions.com

    1 Reply Last reply
    0

  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Login

  • Don't have an account? Register

  • Login or register to search.