I want to remove the most visited thumbnails from Chromium's “New Tab” page. After inspecting the contents of that page, I determined that the following line of JavaScript does the trick:
document.getElementById("most-visited").remove();
But I still have one remaining problem: How do make it so that this line runs automatically when I open a new tab? Presumably I have to wrap it in a function and register an event handler, but I've been unable to find more precise information.
EDIT:
It seems that Chromium explicitly prevents tampering with the “New Tab” page. I debugged Haibara Ai's solution by making the following changes:
In manifest.json:
"matches": [ "*://*/*" ],
In content.js:
var mv = document.getElementById("most-visited"); if (mv) mv.remove(); else window.alert("test");
And reloaded the extension. When I opened a New Tab, the thumbnails still appeared. Yet, when I refreshed a different page, a message box saying “test” was displayed.