Created
March 1, 2023 18:56
-
-
Save phette23/0052439c56770b0d178df647ca00162d to your computer and use it in GitHub Desktop.
select all checkboxs on chrome's history page chrome://history
This file contains hidden or 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
document | |
.querySelector('history-app').shadowRoot | |
.querySelector('history-list').shadowRoot | |
.querySelectorAll('history-item').forEach((hi, i) => { | |
const cbox = hi.shadowRoot.querySelector('cr-checkbox') | |
// merely setting checked = true doesn't work, chrome wants you to click them | |
if (!cbox.checked) cbox.click() | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@mcd8604 I'm on a Mac but yeah ⌘ + A selects everything, thank you! That's great. I have no idea how I was supposed to guess that.