Post Reply 
Adapting “hosts” file block lists to Privoxy's way of blocking…
Aug. 04, 2015, 09:31 AM
Post: #18
RE: Adapting “hosts” file block lists to Privoxy's way of blocking…
(Aug. 02, 2015 03:22 AM)cattleyavns Wrote:  Okay, here we go, convert2privoxy HTML + JS version, this is a very first Alpha version, can you integrate your optimization into it ? I'm pretty busy at this time:
Only Hosts2Privoxy, other feature coming soon..

Code:
<script>
function h2p() {
var input = document.getElementById('input')
var output = document.getElementById('input')
input = input.value.replace(new RegExp(/(?:127.0.0.1|0.0.0.0).*?(\w.*)/gi), '$1')
input = '{+block{hosts}}\n' + input
document.getElementById('output').value = input
//alert(input)
}
</script>

Thanks for setting the base of the code. I'll have a look into this.

Quote:We can upload this tool to a random webserver, or simply open our network port and use this tool from everywhere, even Android or IOS.

This seems really good indeed!
Add Thank You Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Adapting “hosts” file block lists to Privoxy's way of blocking… - Faxopita - Aug. 04, 2015 09:31 AM

Forum Jump: