Google History Deleter

press 3 to autoclick and load more google history. Automatically deletes history.

当前为 2016-06-15 提交的版本,查看 最新版本

// ==UserScript==
// @name         Google History Deleter
// @namespace    https://history.google.com/history
// @version      0.2
// @description  press 3 to autoclick and load more google history. Automatically deletes history.
// @author       RexOmni
// @match        https://history.google.com/history/*
// @grant        none
// @require      https://ajax.googleapis.com/ajax/libs/jquery/2.2.2/jquery.min.js
// @updateULR    https://openuserjs.org/meta/RexOmniFurtim/Google_History_Deleter.meta.js
// ==/UserScript==

(function() {
    var isWorking = false;
    var t=setInterval(work,1000);

    //md-checked
    function work(){
        if(isWorking){
            // click all epty checkmarks
            $("md-checkbox.ng-empty").click();

            // if there is a load more button
            if($("button[ng-click='lookupController.loadMore()']").length === 0){
                $("button[ng-click='lookupController.loadMore()']").click(); // load more
            }
            else {
                console.log("Deleting");
                $("button.history-delete-btn").click();
            }
        }}

    window.onkeydown = function(event) {
        // key code '3'
        if (event.keyCode === 51) {
            if (!isWorking){
                alert("On");

                isWorking = true;
            }
            else{
                alert("Off");
                isWorking = false;
            }
        }
    };

    console.log("GoogleHistoryCLicker Loaded!");
})();