您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
NSFWをぼかしていい感じに見れるやつ
// ==UserScript== // @name Blur NSFW // @namespace http://github.com/yuzulabo // @version 1.0.2 // @description NSFWをぼかしていい感じに見れるやつ // @author nzws / ねじわさ // @match https://knzk.me/* // @match https://mastodon.cloud/* // @match https://friends.nico/* // @match https://mstdn.jp/* // @license MIT License // ==/UserScript== (function() { const mainElem = document.getElementById('mastodon'); if (!mainElem) return; const observer = new MutationObserver((mutations) => { mutations.forEach((mutation) => { let node = mutation.addedNodes; let i = 0; while (node[i]) { if (node[i].tagName) { let image = node[i].querySelector('.media-gallery'); if (image) { if (image.children[1].className === 'media-spoiler') { image.children[1].click(); let p = 1; while (image.children[p]) { image.children[p].className += ' image_blur'; p++; } } } } i++; } }); }); observer.observe(mainElem, { childList: true, subtree: true }); const style = document.createElement("style"); style.innerHTML = ".image_blur {filter: blur(4px)}"; document.querySelector("head").appendChild(style); })();