Automatically selects and deletes history from history.google.com
目前為
// ==UserScript==
// @name Google History Deleter
// @namespace https://history.google.com/history
// @version 0.2.1
// @description Automatically selects and deletes history from history.google.com
// @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!");
})();