diff options
| author | Yuval Adam <yuv.adm@gmail.com> | 2014-01-14 02:24:01 +0200 |
|---|---|---|
| committer | Yuval Adam <yuv.adm@gmail.com> | 2014-01-14 02:24:01 +0200 |
| commit | 95de2fe7574aefb5ff2ea750f29b894ca63affb1 (patch) | |
| tree | a94e1e64f78f3bbf36cb9c298be5553687294fa8 /lib | |
| parent | a3fdb328f89acec265356b2d483d3bce1a4824ad (diff) | |
Block stupid bots script
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/main.js | 3 |
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)); + } } } }; |
