Adding support for alternative Yandex domains

pull/502/head
Kevin Payravi 2024-02-18 00:59:11 -06:00
parent dff009d2ff
commit 47b42b8af5
3 changed files with 37 additions and 1 deletions

View File

@ -63,6 +63,24 @@
"https://*.ecosia.org/*",
"https://*.qwant.com/*",
"https://*.yandex.com/*",
"https://*.yandex.ru/*",
"https://*.yandex.by/*",
"https://*.yandex.kz/*",
"https://*.yandex.uz/*",
"https://*.yandex.com.tr/*",
"https://*.yandex.fr/*",
"https://*.yandex.az/*",
"https://*.yandex.com.ge/*",
"https://*.yandex.com.am/*",
"https://*.yandex.co.il/*",
"https://*.yandex.lv/*",
"https://*.yandex.lt/*",
"https://*.yandex.ee/*",
"https://*.yandex.md/*",
"https://*.yandex.tm/*",
"https://*.yandex.tj/*",
"https://*.yandex.eu/*",
"https://*.ya.ru/*",
"https://*.startpage.com/*",
"https://*.search.yahoo.com/*",
"https://www.google.com/search*",

View File

@ -120,6 +120,24 @@
"https://*.ecosia.org/*",
"https://*.qwant.com/*",
"https://*.yandex.com/*",
"https://*.yandex.ru/*",
"https://*.yandex.by/*",
"https://*.yandex.kz/*",
"https://*.yandex.uz/*",
"https://*.yandex.com.tr/*",
"https://*.yandex.fr/*",
"https://*.yandex.az/*",
"https://*.yandex.com.ge/*",
"https://*.yandex.com.am/*",
"https://*.yandex.co.il/*",
"https://*.yandex.lv/*",
"https://*.yandex.lt/*",
"https://*.yandex.ee/*",
"https://*.yandex.md/*",
"https://*.yandex.tm/*",
"https://*.yandex.tj/*",
"https://*.yandex.eu/*",
"https://*.ya.ru/*",
"https://*.startpage.com/*",
"https://*.search.yahoo.com/*",
"https://www.google.com/search*",

View File

@ -673,7 +673,7 @@ function main(mutations = null, observer = null) {
}
}, { once: true });
}
} else if (currentURL.hostname.includes('yandex.com')) {
} else if (currentURL.hostname.includes('yandex.') || currentURL.hostname.includes('ya.ru')) {
// Function to filter search results in Yandex
function filterYandex() {
let searchResults = Array.from(document.querySelectorAll('.serp-item a.link, .serp-item a.Link')).filter(el =>