0

Update del-qaru.user.js

This commit is contained in:
2019-10-16 09:19:35 +00:00
parent ca3f3e6df0
commit 928866a69a
2 changed files with 27 additions and 22 deletions

View File

@@ -1,22 +0,0 @@
// ==UserScript==
// @name Remove QARU from Google search
// @version 1.1
// @description Удаляет сайт qaru.site из поисковой выдачи гугла
// @author DmitriyMX
// @namespace https://gitlab.com/DmitriyMX/remove-qaru-from-google-search
// @downloadURL https://gitlab.com/DmitriyMX/remove-qaru-from-google-search/raw/master/del-qaru.user.js
// @updateURL https://gitlab.com/DmitriyMX/remove-qaru-from-google-search/raw/master/del-qaru.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';
Array.from(document.getElementsByClassName('g'))
.filter(elm => { return elm.querySelector('a[href*="qaru.site"]') !== null })
.forEach(elm => { elm.remove() })
})();

27
del-so-clones.user.js Normal file
View File

@@ -0,0 +1,27 @@
// ==UserScript==
// @name Remove SO-clones from Google search
// @version 1.2
// @description Удаляет клоны StackOverflow из поисковой выдачи гугла
// @author DmitriyMX
// @namespace https://gitlab.com/DmitriyMX/remove-qaru-from-google-search
// @downloadURL https://gitlab.com/DmitriyMX/remove-qaru-from-google-search/raw/master/del-so-clones.user.js
// @updateURL https://gitlab.com/DmitriyMX/remove-qaru-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(); })
})();