Nifty Script of the Day

Harrison Horowitz’s nifty script (run via Greasemonkey in Firefoxor Tampermonkey in Chrome is a nifty way to avoid a LOT of repetitive clicking, if you are interested in deleting your Google Search History.

Wait, Didn’t I Disable That Stuff?

Google isn’t Facebook… but I do think they’ve re-enabled some things which I explicitly disabled before. It is definitely worth checking on your history, if you think you turned it off, but aren’t sure. I thought my history was definitely disabled, but apparently something reenabled it a few months ago, along with tailored advertising (which I am certain I disabled immediately upon it’s release years back).

See what Google is storing about you with their Dashboard

Script Issues

Using the script: after installing greasemonkey select “New User Script” from the drop down,* to includes, copy the script below, and select “Use script from clipboard.” Viola. It should run. If it doesn’t you may need to CMD+Shift+R.

/ ==UserScript==
// @name       Automatically delete all Google Web History (page after page...)
// @version
// @description  This will delete all of your web history Google saves about you, one page at a time. Just go to and login.
// @match*/history*
// @match*/history*
// @grant     GM_deleteValue
// @grant     GM_getValue
// @grant     GM_setValue
// @grant     GM_info
// @author    Harrison Horowitz
// @license    MIT
// ==/UserScript==

var deleteButton;

function findButtonAndClick() {
    console.log("clicking delete");
    if (typeof document.edit != "undefined") {;
    } else {
        if (typeof deleteButton != "undefined") {
        } else {
            //window.location.reload();// = "";
            var nodeList = document.getElementsByName("btnD");

function doItYo(){
    try {
        console.log("clicking selector_top");
        setTimeout(findButtonAndClick, 1100);
    } catch (err) {console.log(err);}

// a function that loads jQuery and calls a callback function when jQuery has finished loading
function addJQuery(callback) {
    var script = document.createElement("script");
    script.setAttribute("src", "//"); // //
    script.addEventListener('load', function() {
        var script = document.createElement("script");
        script.textContent = "window.jQ=jQuery.noConflict(true);(" + callback.toString() + ")();";
    }, false);

// the guts of this userscript
function mainKillHistory() {
    var deleteButton = jQ("input.kd-button");
    jQ(document).on("ready", clickThem);

document.addEventListener('DOMContentLoaded', function() {
    setTimeout(doItYo, 5000);


try {
    function timedRefresh(timeoutPeriod) {
        setTimeout(location.reload(true), timeoutPeriod);
} catch (err) {


Chrome will randomly serve 502s and log you out while this script is running. You may be getting flagged for hitting the site too many times… which is stupid, because they’re the ones force you to do that… or it may just be that you’re causing a lot of errors. This script does use a bunch of deprecated stuff //@ and getAttributeNode() as well as logging some reference errors… but… that doesn’t really seem to affect performance.

comments powered by Disqus