您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
block porn sites!
当前为
// ==UserScript== // @name Porn Sites Blocker Beta // @namespace http://tampermonkey.net/ // @version 0.1 // @description block porn sites! // @license GNU GPLv3 // @author Yusuf Sameh // @match https://greasyfork.org/en/scripts?q=porn+blocker // @icon https://www.google.com/s2/favicons?sz=64&domain=greasyfork.org // @grant none // @include https://*.pornhub.com/* // @include https://*.xhamster.com/* // @include https://*.xvideos.com/* // @include https://*.thegay.com/* // @include https://*.gay.bingo.com/* // @include https://*.thisvid.com/* // @include https://*.youporn.com/* // @include https://*.stripchat.com/* // @run-at document-start // @namespace https://greasyfork.org/users/12417 // ==/UserScript== function block() // Function will block the website. { var current = window.location.href; window.history.back(); // Attempt to go back (if it's opened in a tab with no tab history) if (window.location.href == current) // If it's still there { window.close(); // Attempt to close page if (window.location.href == current) // If it's still there (if it's the only tab) { window.location.href = "about://newtab"; // Go to a new tab; always works! } } } // ==/UserScript== (function() { 'use strict'; block(); // Your code here... })();