Google Tracking B Gone: Fix removing of click tracking from links inside text snippets
parent
df5886f9af
commit
cbb2b19301
|
@ -1,6 +1,6 @@
|
||||||
// Google Tracking-B-Gone - FIXED version (by Vitaliy Filippov)
|
// Google Tracking-B-Gone - FIXED version (by Vitaliy Filippov)
|
||||||
// version 2.3
|
// version 2.4
|
||||||
// Release Date: 2012-05-22
|
// Release Date: 2012-08-18
|
||||||
// Original link http://sbdev.org
|
// Original link http://sbdev.org
|
||||||
// Now http://userscripts.org/scripts/show/120330
|
// Now http://userscripts.org/scripts/show/120330
|
||||||
// See also http://userscripts.org/scripts/show/132237
|
// See also http://userscripts.org/scripts/show/132237
|
||||||
|
@ -64,8 +64,8 @@ function doIt() {
|
||||||
|
|
||||||
resultLinks = $x("//a");
|
resultLinks = $x("//a");
|
||||||
resultLinks.forEach(function(link) { // loop over links
|
resultLinks.forEach(function(link) { // loop over links
|
||||||
var oldLink = link.href;
|
var oldLink = link.href;
|
||||||
if (/^http:\/\/www.google/.test(oldLink) || /^https:\/\/encrypted.google/.test(oldLink)) {
|
if (/^https?:\/\/www.google/.test(oldLink) || /^https:\/\/encrypted.google/.test(oldLink)) {
|
||||||
var matches = /url\?(url|q)=(.+?)&/.exec(oldLink);
|
var matches = /url\?(url|q)=(.+?)&/.exec(oldLink);
|
||||||
if (matches != null) {
|
if (matches != null) {
|
||||||
link.href = unescape(matches[2]);
|
link.href = unescape(matches[2]);
|
||||||
|
|
Loading…
Reference in New Issue