summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuval Adam <yuv.adm@gmail.com>2014-01-14 02:24:01 +0200
committerYuval Adam <yuv.adm@gmail.com>2014-01-14 02:24:01 +0200
commit95de2fe7574aefb5ff2ea750f29b894ca63affb1 (patch)
treea94e1e64f78f3bbf36cb9c298be5553687294fa8
parenta3fdb328f89acec265356b2d483d3bce1a4824ad (diff)
Block stupid bots script
-rw-r--r--lib/main.js3
1 files changed, 3 insertions, 0 deletions
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));
+ }
}
}
};