Skip to content

Instantly share code, notes, and snippets.

@dataserver
Created July 18, 2019 14:40
Show Gist options
  • Save dataserver/3d56f588a5d587d2028b3cbc78cfc169 to your computer and use it in GitHub Desktop.
Save dataserver/3d56f588a5d587d2028b3cbc78cfc169 to your computer and use it in GitHub Desktop.
js delete chrome history
inputs = document.querySelectorAll("input")
inputs.forEach(i => {i.checked = true})
button = document.querySelector("#remove-selected");
button.disabled = false;
button.click()
alertOverlayOk.click()
// OR
var inputs = document.getElementsByTagName('input');
for (var i = 0; i < inputs.length; ++i) {
if (inputs[i].type == "checkbox"){
inputs[i].checked = true;
}
}
document.getElementById("remove-selected").disabled = false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment