Google Search Spam Filter

removes blacklisted search results

  1. // ==UserScript==
  2. // @name Google Search Spam Filter
  3. // @name:ru Фильтр спама в результатах поиска Google
  4. // @description removes blacklisted search results
  5. // @description:ru скрывает ненужные результаты в выдаче
  6. // @namespace https://www.google.com/search
  7. // @include /^https?://(www\.)?google\.\w+//
  8. // @copyright 2018, StSav012
  9. // @author StSav012
  10. // @grant none
  11. // @version 0.1.20210411.2
  12. // @run-at document-end
  13. // ==/UserScript==
  14.  
  15. /* jshint esversion: 6 */
  16. /* jshint browser: true */
  17.  
  18. "use strict";
  19.  
  20. // blacklisted URLs
  21. var spamURLs = ['http://qaru.site/', 'https://stackoverrun.com/', 'https://manjaro.ru/', 'https://qastack.ru/', 'https://coderoad.ru/',
  22. 'https://overcoder.net/', 'https://overcoder.net:8443/', 'https://www.coder.work/', 'https://helpexe.ru', 'https://www.dvhu.com/',
  23. 'http://doc.crossplatform.ru/', 'https://quares.ru/', 'https://www.cnpython.com/', 'http://hk.uwenku.com/', 'https://www.debugcn.com/',
  24. 'https://tr.coredump.biz/', 'https://www.thinbug.com/', 'https://cloud6.net/'];
  25.  
  26. for (let u of spamURLs) {
  27. var junk = document.querySelectorAll('div a[href^="' + u + '"]:not([class])');
  28. for (let j of junk) {
  29. var p = j.parentNode;
  30. while (p.tagName == 'DIV' && !p.classList.contains('g')) {
  31. p = p.parentNode;
  32. }
  33. // console.log('found', p);
  34. p.parentNode.removeChild(p);
  35. }
  36. }

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址