Last active
November 8, 2016 20:09
-
-
Save seanvikoren/5443912ff4baf825327166b7e79b818f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name NewTabMostVisitedRemoval | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description remove elements from newtab | |
// @author Sean Vikoren | |
// @match https://*/* | |
// @run-at document-end | |
// @grant GM_getValue | |
// @grant GM_setValue | |
// @grant GM_deleteValue | |
// ==/UserScript== | |
/* jshint -W097 */ | |
'use strict'; | |
// Remove Elements | |
const REGEXP = /^https?:\/\/www.google.[a-z.]+\/\_\/chrome\/newtab.*/; | |
var isDefaultNewTab = REGEXP.test(top.location.href); | |
//var isDefaultNewTab = false; | |
if (isDefaultNewTab) { // If default new tab | |
var killList = ['most-visited']; | |
for (var i = 0; i < killList.length; i++) { | |
var killMe = document.getElementById(killList[i]); | |
if (killMe) { | |
killMe.parentNode.removeChild(killMe); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment