您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Blocks Access to websites you do not want your kids seeing!
当前为
// ==UserScript== // @name Block Websites for your Kids // @namespace https://greasyfork.org/en/users/744284-moatazomr // @version 0.5 // @description Blocks Access to websites you do not want your kids seeing! // @author Moataz Omar // @match *://*/* // @compatible Chrome // @compatible Firefox // @compatible Edge // @grant none // @copyright GPL // ==/UserScript== (function() { 'use strict'; // ---Variables--- var host = window.location.hostname.replace('www.', ''); // alert(host); var result = searchHost(host); })(); function blockedUrl() { var doc = document; var con = confirm; var al = alert; var page_reload = open('https://duckduckgo.com/', '_self').close(); // ---Functions--- doc.title = 'Forbiden Content'; //con("This Site is NOT for Kids! Go watch some YouTube instead!")&&window.open(""); //al("Website Blocked!"); page_reload; al("Parental Advisory: Website Contains Explicit Content not suited for children!") //window.open(""); } function searchHost(host) { // host = 'twinkbfvideos.com'; fetch("https://raw.githubusercontent.com/chadmayfield/pihole-blocklists/master/lists/pi_blocklist_porn_top1m.list") .then(function (response) { response.text().then(function (responseText) { // alert( (host) ); if(responseText.indexOf(host)>= 0 || customlist.indexOf(host)>= 0 ) { blockedUrl(); } }); }); } //https://github.com/StevenBlack/hosts var customlist = 'google.com;\ wikimedia.org;';