Last active
June 7, 2018 05:44
-
-
Save sincerekamal/2c8b55a66e77d898c4f7 to your computer and use it in GitHub Desktop.
Clear Chrome: browser history in the current view
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
(() => { | |
var ele = document.querySelector('history-app'); | |
var historyItems = ele.shadowRoot.querySelector('history-list').shadowRoot.querySelector('iron-list').querySelectorAll('history-item'); | |
historyItems.forEach((item) => { item.shadowRoot.querySelector('#checkmark').click(); }); | |
ele.shadowRoot.querySelector('history-toolbar').shadowRoot.querySelector('cr-toolbar-selection-overlay').shadowRoot.querySelector('#delete').click(); | |
var btnCont = ele.shadowRoot.querySelector('history-list').shadowRoot.querySelector('dialog').shadowRoot.children[3].querySelector('content[name="button-container"]'); | |
btnCont.getDistributedNodes()[0].querySelector('.action-button').click(); | |
})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you want to clear history having specific words, follow the steps
This above script tested in Chrome v66.