de-sponsors trusted-site

scriptsurf

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @description scriptsurf
// @name        de-sponsors trusted-site
// @version     1.0
// @date        2011-08-10
// @author      mleha ([email protected])
// @include     http://*
// @include     https://*
/*******************************************
Скрипт предназначен для автоматического закрытия страниц нежелательных сайтов
В список нужно добавить сайты, которые НЕ ДОЛЖНЫ закрываться. Остальные сайты скрипт будет пытаться закрыть

sites.push("www.site.com");
sites.push("site.com");

добавить эти строки нужно ниже подобных и перед строкой 
Array.prototype.contains2 = function(obj) {

добавлять сайт с WWW. или без зависит от того как он открывается в браузере.
*******************************************/
// @namespace https://greasyfork.org/users/160340
// ==/UserScript==

var sites=new Array();
sites.push("surfmore.eu");
sites.push("www.proyos.de");
sites.push("mail.google.com");
sites.push("www.klamm4mail.de");
sites.push("klamm4mail.de");
sites.push("klamm-mailer.de");
sites.push("www.klamm-mailer.de");
sites.push("www.trucker-mails.de");
sites.push("www.kueko-net.de");
sites.push("www.exclusivmails.de");
sites.push("www.maggis-diamant.de");
sites.push("www.maiks-diamant.de");
sites.push("www.klammlose-euro-mailer.de");
sites.push("www.klammino.de");
sites.push("ya.ru");
sites.push("www.losecompany.de");
sites.push("www2.searchresultsdirect.com");
sites.push("www.horrorfilme.de");
sites.push("www.vistaprint.de");
sites.push("www3.westfalia.de");
sites.push("www.thomson-line.de");
sites.push("shop.beate-uhse");
sites.push("www.tipp24games.de");
sites.push("www.ccbparis.de");
sites.push("www.absahnen.de");
sites.push("www.autoteile-meile.at");
sites.push("www.rotlichtgangsta.de");
sites.push("global.dubli");
sites.push("regger24.de");
sites.push("tt.adcocktail");
sites.push("cashinlink.com");
sites.push("www.etoro.ru");
sites.push("www.adsure.de");
sites.push("kruta.de");
sites.push("www.ghetto-mafia.eu");
sites.push("besutau.de");
sites.push("www.50cent-mail.de");
sites.push("regionalmail.de");
sites.push("www.regionalmail.de");
sites.push("www.monsterpots.de");


window.onbeforeunload = function () { }; 

//добавляйте разрешенные сайты выше, согласно рекомендации
Array.prototype.contains2 = function(obj) {
  var i = this.length;
  while (i--) {
    if (this[i] == obj) {
      return true;
    }
  }
  return false;
}

function getSite(){
	return window.location.hostname;
}

var SITE = getSite();
try{
	if (window.top.location.href==window.location.href){
		
		if (!sites.contains2(SITE)){
			window.close();
		}
	}
}catch(err){}