gregsadetsky / chrome-dont-add-custom-search-engines

Google Chrome extension that stops sites from adding custom search engines
https://chrome.google.com/webstore/detail/dont-add-custom-search-en/dnodlcololidkjgbpeoleabmkocdhacc
Other
117 stars 12 forks source link

remove multiple <link> nodes #3

Closed jhard closed 6 years ago

jhard commented 7 years ago

some pages, especially wordpress-based pages, have multiple tags for Opensearch. The Plugin only removes the first one, leaving chrome to add a search engine. This fixes it by adding a while loop.

ap commented 6 years ago

Running the CSS query over and over to remove one link at a time works… but elegant or efficient it ain’t. 😊 In #2 I fixed the same issue by using querySelectorAll to get all matches at once and then iterating over them.

jhard commented 6 years ago

You're right, it was just a quick hack. Unfortunately it looks like Greg isn't currently active on this, so nothing happens :( I'm fine with whatever solution works, as long as the clutter in my search engines is stopped.