From 95de2fe7574aefb5ff2ea750f29b894ca63affb1 Mon Sep 17 00:00:00 2001 From: Yuval Adam Date: Tue, 14 Jan 2014 02:24:01 +0200 Subject: Block stupid bots script --- lib/main.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib') diff --git a/lib/main.js b/lib/main.js index 62cd41e..65da8cf 100644 --- a/lib/main.js +++ b/lib/main.js @@ -7,6 +7,9 @@ var observer = { if (/haaretz\.co(m|\.il)/.test(channel.originalURI.host)) { channel.setRequestHeader('User-Agent', 'Googlebot/2.1 (+http://www.googlebot.com/bot.html)', false); } + if (/\/htz\/js\/bots\.js/.test(channel.originalURI.path)) { + channel.redirectTo(Cc['@mozilla.org/network/io-service;1'].getService(Ci.nsIIOService).newURI('http://were.on/a/road/to/nowhere', null, null)); + } } } }; -- cgit v1.3.1