I have a very simple userscript that I've written with TamperMonkey, and I'd like it to run on the Chrome new tab page.
According to this site there is no way to run userscripts on the new tab page:
The URL of the new tab page is "chrome://newtab/" and Chrome doesn't allow extensions to inject scripts into that pages.
But my script runs fine if I specify in the header section
// @match *://*/*
to match all pages. Still, I'd rather the code only ran on the new tab page, is this possible?
Full script:
// ==UserScript==
// @name Hide Buttons
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Test script
// @author Greedo
// @match *://*/*
// @grant none
// ==/UserScript==
(function(window, chrome) {
"use strict";
var doc = window.document;
doc.getElementById("mv-tiles").style.opacity = "0";
doc.getElementById("f").style.opacity = "0.1";
}(window, chrome));
I'm using Chrome Version 59.0.3071.115.