Return to Index  

two additions

December 6 2015 at 8:08 PM
No score for this post
Charlie  (no login)

 
i suggest you add these:

|| shExpMatch(host, "*click*")
this one was to get clickbank.net, but i thought why not make it more universal. i have not yet had any issues with it yet.

|| shExpMatch(url, "*/ads\?*")
this one is super important (there is a single back slash before the ?). originally it was to get the google thing at the bottom of ebay, but it also seems to remove the advertising on google results also. normally for shexpmatch, the ? means anycharacter, however i need that in the match, so i add \ (backslash) as the escape character before it. this was to get the url: http://www.google.com/afs/ads?q=potatoes&.... but obviously it can get other websites also (not sure of any good ones yet), which is why its not in below:



just in case someone finds it useful, this is my google section (slightly incomplete due to hosts file that is also in use). the pilcrow symbol (can be any character) is there to make the first * always applicable.

|| (shExpMatch("ΒΆ" + host, "*google*")
&& !(dnsDomainIs(host, ".googlevideo.com") //allow youtube
|| shExpMatch(url, "*captcha*")
|| dnsDomainIs(host, ".google.com.au")
|| dnsDomainIs(host, ".google.com.uk") //backups
|| (dnsDomainLevels(host) == 2 // == 2 allows US www. 3 allows AU,UK www (with other stuff)... still allows allows WWW,webcache,translate,ajax. does not allow any google domains with 3 or more dots. may see if i can ban dnsdomains that are too long...
&& !(shExpMatch(host, "*hosted*") //block ghs.googlehosted.com
|| shExpMatch(host, "clients*") //block clients5.google.com ,clients-cctld.l.google.com
|| shExpMatch(host, "apis*") //might block useful media. https://apis.google.com/js/plusone.js
|| dnsDomainIs(host, ".googletagservices.com") //found on some web pages with the adservices domain name
|| dnsDomainIs(host, ".googleadservices.com")
|| dnsDomainIs(host, ".google-analytics.com") //also required for youtube comments. use https://www.youtube.com/all_comments?v= to see comments.
|| shExpMatch(url, "*adsense*") //google.com/adsense/search/async-ads.js
))))

Its been a while since i checked, but if you disable sb-ssl.google.com and/or safebrowsing.clients.google.com in the HOSTS file, firefox gets crippled after a month or so (crippled as in: works slowly). you have been warned. issue not applicable to non-chrome versions as far as i know.


I use the Web Server from http://www.ritlabs.com/tinyweb/ to give a response when there is a blockage. it gives "Forbidden". it logs all the requests which i clear using a batch file at startup. the parameter is the shared directory.

cb.
backslashs were not present in post after previewing so I ensured that i wrote (backslash) note.

 
Scoring disabled. You must be logged in to score posts.Respond to this message   
Find more forums on Network54Create your own forum at Network54
 Copyright © 1999-2018 Network54. All rights reserved.   Terms of Use   Privacy Statement