Skip to main content
1 of 14
Mori
  • 115
  • 1
  • 5
  • 20

Chrome bookmarklet: convert jQuery to JavaScript

I created the following Chrome bookmarklet to open all Extra Examples boxes on this page: javascript:$('.box_title').click();

It works with no problem. However, I'd prefer to use vanilla JavaScript. This is what I have for now: javascript:Array.from(document.getElementsByClassName('box_title')).forEach(e => e.click());

Do you see any problems? Can it be improved?

Mori
  • 115
  • 1
  • 5
  • 20