Google Tracking-B-Gone

By tbolt Last update Nov 27, 2010 — Installed 28,763 times.

Internationalization / News

in
Subscribe to Internationalization / News 1 post, 1 voice

gdm User
ChromeX11

Hi tbolt,

Thanks a lot for making this script available. Before installing it on my system, I made two changes:

1. To make it work for international Google services like www.google.fr, I removed ".co" from the regular expression.

2. To make it work with international Google News sites (like news.google.de), I removed "www" from the regular expression and allowed ".*" before the "url=..." parameter when extracting the matches.

54,55c54,55
< if (/^http:\/\/www.google.co/.test(oldLink) || /^https:\/\/encrypted.google.co/.test(oldLink)) {
< var matches = /url\?(url|q)=(.+?)&/.exec(oldLink);
---
> if (/^http:\/\/.+.google./.test(oldLink) || /^https:\/\/encrypted.google./.test(oldLink)) {
> var matches = /url\?.*(url|q)=(.+?)&/.exec(oldLink);
73c73
< if (/^http:\/\/www.google.co/.test(oldLink) || /^https:\/\/encrypted.google.co/.test(oldLink)) {
---
> if (/^http:\/\/.+.google./.test(oldLink) || /^https:\/\/encrypted.google./.test(oldLink)) {

Cheers,
Gerard

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel