jakubboucek / roumen-cz-improve-ui

Google Chrome extension for improve UX on rouming.cz website
https://chrome.google.com/webstore/detail/roumingcz-improve-ui/lgdnbbdjbnideafkhpplilmgoclpbpca
MIT License
0 stars 0 forks source link

skipDisliked option works only on 1st '>>' button #10

Closed certicky closed 2 years ago

certicky commented 2 years ago

There's a slight problem with the new skipDisliked option. There are two instances of 'olderButton' on desktop version of the site:

image

The function works well when you click the first button (or when you press right arrow on the keyboard). However, it doesn't trigger when you click on the second one, or the right.

The problem is on this line: https://github.com/jakubboucek/roumen-cz-improve-ui/blob/dc3f9504762ce276c74ffcf691e7887382164015/roumen.js#L68

The document.querySelector() call only returns the first element matching that xpath. Consider using document.querySelectorAll() instad.