Internet Guardian

Enhance your online well-being by blocking explicit content.

目前為 2023-12-19 提交的版本,檢視 最新版本

// ==UserScript==
// @name         Internet Guardian
// @description  Enhance your online well-being by blocking explicit content.
// @version      4.01
// @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',
    'fuck',
    'nude',
    'orgy',
    'porn',
    'tits',
    'xnxx',
    'boobs',
    'naked',
    'penis',
    'pussy',
    'hanime',
    'hentai',
    'rule34',
    'vagina',
    'blowjob',
    'breasts',
    'handjob',
    'xvideos'
];

const url = window.location.href;
const titleAndUrl = [document.title, url].join(" ").toLowerCase();

// Redirect user if keywords are found
if (keywords.some(keyword => titleAndUrl.includes(keyword))) {
    location.replace("https://www.google.com/");
}

// Enable safe-search for extra peace of mind
if (url.includes('search') && !url.endsWith("&safe=on")) {
    window.location.href = url + "&safe=on";
}