Block NSFW and other 18+ content.
当前为
// ==UserScript==
// @name Internet Guardian
// @namespace http://tampermonkey.net/
// @version 6.4
// @description Block NSFW and other 18+ content.
// @author Zachary Kosove
// @match *://*/*
// @grant none
// @run-at document-start
// @icon https://icons.iconarchive.com/icons/graphicloads/folded/256/unlock-folded-icon.png
// ==/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.toLowerCase();
// Replace URL
if (keywords.some(keyword => url.includes(keyword))) {
if (url.startsWith("https://duckduckgo.com/")) {
location.replace("https://duckduckgo.com/");
} else {
location.replace("https://www.google.com/?safe=on");
}
}
// Enable safe-search
else if (url.startsWith("https://www.google.com/search?") && !url.includes("safe=on")) {
window.location.href += "&safe=on";
}