Auto.ru del ad-units

Removes ad-units

目前為 2016-01-03 提交的版本,檢視 最新版本

// ==UserScript==
// @name        Auto.ru del ad-units
// @description Removes ad-units
// @namespace   lainscripts_scissors
// @include     http://auto.ru/cars/*
// @version     1.0
// @grant       none
// ==/UserScript==

function cleaner() {
  var l = {
    'auto.ru': {
      selector: '.widget > .sales-list-item',
      words: /Реклама/
    }
  },
  host = '',
  pos = - 1;
  for (var n in l) {
    pos = window.location.host.search(n);
    if (pos > - 1 && (pos - (window.location.host.length - n.length) == 0)) {
      host = n;
      break;
    }
  }
  if (host === '') return;
  var a = document.querySelectorAll(l[host].selector),
  i = a.length;
  while (i--) if (a[i].innerHTML.match(l[host].words)) a[i].style.display = 'none';
}
cleaner();

QingJ © 2025

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