Darker Google userscript not working in Tampermonkey 4.7

259 Views Asked by At

I'm trying to install the Darker Google userscript in Tampermonkey 4.7 (for Safari 12), but it's not working.

Since I'm a total newbie on Tampermonkey I don't really know where to put my hands on.

In the Tampermonkey's dashboard I see that this userscript does not match any particular website, while for example Darker Facebook shows "*.facebook.com" and it works, but perhaps this is just a bad guess.

The beginning of the userscript is:

(function() {var css = "";
css += [
        "/* Darker Google by Zigboom Designs */",
        "",
        "@namespace url(http://www.w3.org/1999/xhtml);"
    ].join("\n");
if (false ||
    (document.location.href.indexOf("http://blogsearch.google") == 0) ||
    (document.location.href.indexOf("http://books.google") == 0) ||
    (document.location.href.indexOf("http://209.85.165.104") == 0) ||
    (document.location.href.indexOf("http://translate.google") == 0) ||
    (document.location.href.indexOf("http://video.google") == 0) ||
    (document.location.href.indexOf("https://encrypted.google") == 0) ||
    (document.location.href.indexOf("https://translate.google") == 0) ||
    (document.location.href.indexOf("http://scholar.google") == 0) ||
    (document.location.href.indexOf("https://scholar.google") == 0) ||
    (document.location.href.indexOf("http://images.google") == 0) ||
    (document.location.href.indexOf("https://images.google") == 0) ||
    (document.location.href.indexOf("https://www.google.com/fonts") == 0) ||
    (new RegExp("^https?://www\\.google\\.[a-z.]*/(?!calendar|nexus|adsense|analytics|maps).*$")).test(document.location.href))

which makes me thing it should match any *.google.com website... but it doesn't.

1

There are 1 best solutions below

0
Vignesh Raja On BEST ANSWER

Its because the userscript is not running in the page. Add the following line, save it and reload the page.

// @match *://*.google.com/*

The above makes the userscript to run on Google sites.

For match-patterns, refer here