Internet Guardian

Block NSFW and other 18+ content.

当前为 2023-12-25 提交的版本,查看 最新版本

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         Internet Guardian
// @description  Block NSFW and other 18+ content.
// @version      5.1
// @match        *://*/*
// @icon         https://icons.iconarchive.com/icons/graphicloads/folded/256/unlock-folded-icon.png
// @grant        none
// @run-at       document-start
// @namespace https://greasyfork.org/en/scripts/470927-internet-guardian
// ==/UserScript==

const keywords = [
    'sex',
    'cock',
    'dick',
    'fuck',
    'gore',
    'nude',
    'orgy',
    'porn',
    'tits',
    'xnxx',
    'boobs',
    'naked',
    'penis',
    'pussy',
    'hanime',
    'hentai',
    'rule34',
    'vagina',
    'blowjob',
    'breasts',
    'handjob',
    'xvideos'
];
const url = window.location.href;
const lowercaseUrl = url.toLowerCase();

// Redirect
if (keywords.some(keyword => lowercaseUrl.includes(keyword))) {
    location.replace("https://www.youtube.com/watch?v=AWPq4QgAPBM");
}

// Enable safe-search
if (url.startsWith('https://www.google.com/search?') && !url.endsWith("&safe=on")) {
    window.location.href += "&safe=on";
}