Instantly share code, notes, and snippets.
Last active
March 22, 2017 18:16
-
Star
(6)
6
You must be signed in to star a gist -
Fork
(3)
3
You must be signed in to fork a gist
-
Save arantius/960627 to your computer and use it in GitHub Desktop.
The Karma Blocker rules used by the author
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# See: https://github.com/arantius/karma-blocker/wiki/Configuration | |
[Settings] | |
threshold=12 | |
cutoff=18 | |
collapse=false | |
[Group] | |
name="Personal sites whitelist" | |
score=-12 | |
rule=$origin.host=='localhost' | |
rule=$url.host=~'(^|\.)arantius\.com$' | |
rule=$origin.host=~'(^|\.)arantius\.com$' | |
# If any request that a Flash movie makes is blocked, the entire Flash | |
# movie will remove itself from the page. So if we let the movie | |
# through, we let all requests it makes go through, with this rule. | |
[Group] | |
name="Whitelist: flash sub-request" | |
score=-12 | |
rule=$type==object_subrequest | |
[Group] | |
name="Whitelist: LastPass Frame" | |
match=all | |
score=-12 | |
rule=$url.path^='/lpblankiframe.local' | |
rule=$thirdParty==false | |
[Group] | |
name="Whitelist: By Keyword" | |
score=-7 | |
rule=$url=~'jquery|swfobject|wp-content' | |
[Group] | |
name="Whitelist: Google" | |
score=-6 | |
rule=$url.host$='.google.com' | |
rule=$url.host$='.googleusercontent.com' | |
rule=$url.host$='.googlevideo.com' | |
rule=$url.host$='.gstatic.com' | |
rule=$url.host$='.youtube.com' | |
[Group] | |
name="Whitelist: eBay/PayPal" | |
score=-6 | |
rule=$url.host$='.ebaydesc.com' | |
rule=$url.host$='.paypalobjects.com' | |
[Group] | |
name="Whitelist: AliExpress" | |
score=-5 | |
rule=$origin.host$='.alibaba.com' | |
rule=$origin.host$='.aliexpress.com' | |
rule=$origin.host$='.alipay.com' | |
[Group] | |
name="Whitelist: Weather Underground" | |
score=-5 | |
rule=$url.host$='.wxug.com' | |
[Group] | |
name="Whitelist: Yahoo Mail" | |
score=-5 | |
rule=$origin.host$='mail.yahoo.com' | |
[Group] | |
name="CDNs" | |
score=-5 | |
rule=$url.host=~'\.akamai(hd|zed)?\.(com|net)$' | |
rule=$url.host$='.amazonaws.com' | |
rule=$url.host$='.asset-cache.com' | |
rule=$url.host$='.cachefly.com' | |
rule=$url.host$='.cloudflare.com' | |
rule=$url.host$='.cloudfront.net' | |
rule=$url.host$='.edgesuite.net' | |
rule=$url.host$='.fastly.net' | |
rule=$url.host$='.fsdn.com' | |
rule=$url.host$='.ggpht.com' | |
rule=$url.host$='.googleapis.com' | |
rule=$url.host$='.gstatic.com' | |
rule=$url.host$='.indexww.com' | |
rule=$url.host$='.msecnd.net' | |
rule=$url.host=='s3.amazonaws.com' | |
rule=$url.host$='.scene7.com' | |
rule=$url.host=='i0.wp.com' | |
rule=$url.host$='.yahooapis.com' | |
rule=$url.host=~'assets|cdn|image|img\.com|\.media\.|static|style' | |
[Group] | |
name="Whitelist: By origin host" | |
score=-5 | |
rule=$origin.host$=".17track.net" | |
rule=$origin.host$=".mint.com" | |
rule=$origin.host$=".packagetrackr.com" | |
[Group] | |
name="Whitelist: Amazon" | |
match=any | |
score=-3 | |
rule=$origin.host=='www.amazon.com' | |
rule=$url^='https://www.amazon.com/wishlist/add.js' | |
[Group] | |
name="Whitelist: CSS" | |
score=-3 | |
rule=$type==stylesheet | |
[Group] | |
name="Whitelist: Facebook, first party" | |
score=-2 | |
match=all | |
rule=$url.host$='.facebook.com' | |
rule=$origin.host$='.facebook.com' | |
[Group] | |
name="Whitelist: Mint" | |
score=-2 | |
rule=$origin.host$='mint.intuit.com' | |
[Group] | |
name="Auto-generated ID" | |
score=1 | |
rule=$url=~'\b[0-9a-f]{16}\b' | |
rule=$url=~'\b[0-9a-f]{20}\b' | |
rule=$url=~'\b[0-9a-f]{32}\b' | |
rule=$url=~'\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b' | |
[Group] | |
name="Querystring" | |
score=1 | |
rule=$url.path=~'\?' | |
[Group] | |
name="Long encoded data" | |
score=2 | |
# One "word" (consecutive letters and numbers), with lots of letter-number transitions. | |
# But one non A through F letter, to not over-match with Auto ID. | |
rule=$url=~'[g-z]([a-z_-]+[0-9]+){5,}' | |
[Group] | |
name="Long Path" | |
score=2 | |
rule=$url.path=~'^[^?]{175}' | |
[Group] | |
name="Long Querystring" | |
score=2 | |
rule=$url.path=~'\?(.*&){6,}' | |
[Group] | |
name="Sharing" | |
score=2 | |
rule=$url=~'(\b|_)(bit\.?ly|reddit|stumbleupon)(\b|_)' | |
[Group] | |
name="Images and Objects" | |
score=3 | |
rule=$type==image | |
rule=$type==object | |
[Group] | |
name="Keywords (Partial)" | |
score=3 | |
rule=$url=~'(\b|_)cookie|cookie(\b|_)' | |
rule=$url=~'(\b|_)tag|tag(\b|_)' | |
[Group] | |
name="Feed Trackers" | |
score=3 | |
rule=$url.host=="feeds.feedburner.com" | |
rule=$url.host=="feeds.wordpress.com" | |
rule=$url.host=="pixel.wp.com" | |
[Group] | |
name="Host: Keywords" | |
score=4 | |
rule=$url.host=~"(^|\.)ad(?!don)" | |
rule=$url.host=~"(^|\.)(click|optimize|mgid)" | |
rule=$url.host=~"track" | |
[Group] | |
name="(I)FRAMEs" | |
score=4 | |
rule=$type==subdocument | |
[Group] | |
name="Keywords (Full)" | |
score=4 | |
rule=$url=~'(\b|_)(banner|housead|loyalty|partner|pop|poptest)s?\d*(\b|_)' | |
rule=$url=~'(\b|_)(publisher|sponsor|syndication)s?\d*(\b|_)' | |
rule=$url=~'(\b|_)(analytic|beacon|count(er)?|measure|metric|mtrx)(s|er|ing)?\d*(\b|_)' | |
rule=$url=~'(\b|_)(page_?view|ping|pi?xe?l?|radar|s_code|stats|track|urchin|webtrend)(s|er|ing)?\d*(\b|_)' | |
[Group] | |
name="Keywords (Full: Ad)" | |
score=4 | |
rule=$origin.tag.class=~'(\b|_)y?ad_?(block(ed)?|choice|frame|s?api|refresh|sense|server?|sonar|status|vertis(e|ing|ement)?)?s?\d*(\b|_)' | |
rule=$origin.tag.id=~'(\b|_)y?ad_?(block(ed)?|choice|frame|s?api|refresh|sense|server?|sonar|status|vertis(e|ing|ement)?)?s?\d*(\b|_)' | |
rule=$url=~'(\b|_)y?ad_?(block(ed)?|choice|frame|s?api|refresh|sense|server?|sonar|status|vertis(e|ing|ement)?)?s?\d*(\b|_)' | |
[Group] | |
name="Size: Standard Banner" | |
score=4 | |
rule=$origin.tag.size=~'^((120|234|468)x60|(120|728)x90|125x125|120x240|300x250|(120|160|300)x600)$' | |
[Group] | |
name="Invisible" | |
score=6 | |
rule=$origin.tag.height=='0' | |
rule=$origin.tag.size=='1x1' | |
rule=$origin.tag.style=~'display:\s*none' | |
rule=$origin.tag.width=='0' | |
[Group] | |
name="Social" | |
score=6 | |
rule=$url.host$='.digg.com' | |
rule=$url.host$='.facebook.com' | |
rule=$url.host$='.linkedin.com' | |
rule=$url.host$='.pinterest.com' | |
rule=$url.host$='plus.google.com' | |
rule=$url.host$='.twitter.com' | |
rule=$url=='https://apis.google.com/js/platform.js' | |
rule=$url.path=~'/\+1/' | |
[Group] | |
name="Scripts" | |
score=6 | |
rule=$type==script | |
[Group] | |
name="Third-party" | |
score=6 | |
rule=$thirdParty==true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment