dimanche 12 février 2023

Selecting non-input type checkboxes using javascript on console

I want to clear my google history, but I don't want everything to be cleared, so I make a search like "youtube" in the search bar, on chrome://history, page and the result url will be chrome://history/?q=youtube. There will be many results appearing like this: enter image description here As you can see there are 149 results, but in many cases there might be much more. So i want to check all the checkboxes using console using javascript.

I tried changing the tags and ids of functions like function toggle(source) { checkboxes = document.getElementsByName('foo'); for(var checkbox in checkboxes) checkbox.checked = source.checked; } but those checkboxes are written in div having id and role of checkbox enter image description here




Aucun commentaire:

Enregistrer un commentaire