Skip to content

Instantly share code, notes, and snippets.

@phette23
Created March 1, 2023 18:56
Show Gist options
  • Save phette23/0052439c56770b0d178df647ca00162d to your computer and use it in GitHub Desktop.
Save phette23/0052439c56770b0d178df647ca00162d to your computer and use it in GitHub Desktop.
select all checkboxs on chrome's history page chrome://history
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()
})
@phette23
Copy link
Author

phette23 commented May 8, 2025

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment