27 lines
1.1 KiB
JavaScript
27 lines
1.1 KiB
JavaScript
// ==UserScript==
|
|
// @name Remove SO-clones from Google search
|
|
// @version 1.2
|
|
// @description Удаляет клоны StackOverflow из поисковой выдачи гугла
|
|
// @author DmitriyMX
|
|
// @namespace https://gitlab.com/DmitriyMX/remove-so-clones-from-google-search
|
|
// @downloadURL https://gitlab.com/DmitriyMX/remove-so-clones-from-google-search/raw/master/del-so-clones.user.js
|
|
// @updateURL https://gitlab.com/DmitriyMX/remove-so-clones-from-google-search/raw/master/del-so-clones.user.js
|
|
// @match https://google.com/*
|
|
// @match https://google.ru/*
|
|
// @match https://www.google.com/*
|
|
// @match https://www.google.ru/*
|
|
// @grant none
|
|
// ==/UserScript==
|
|
|
|
(function() {
|
|
'use strict';
|
|
const blackUrls = ['qaru.site', 'issue.life', 'jiajianhudong.com']
|
|
|
|
Array.from(document.getElementsByClassName('g'))
|
|
.filter(elm => {
|
|
return blackUrls.reduce((result, item) => {
|
|
return result ? true : elm.querySelector('a').href.includes(item)
|
|
}, false);
|
|
})
|
|
.forEach(elm => { elm.remove(); })
|
|
})(); |