Feature: Safari 9+ - ContentExtensions content
-
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 -
this seems like a good fit,
once v5.0.4 is released, Ill take a look at this for 5.0.5/5.1 -
do you know of any other extensions which store data in these locations?
most likely just ad blockers i guess -
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-BlockThen 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/ -
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>
-
I just posted a beta with support for ContentExtension data
https://sweetpproductions.com/support/showthread.php?tid=340&pid=1144#pid1144