您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
This script will automatically hide all images in signatures under each forum post
// ==UserScript== // @namespace Planetsuzy // @name Planetsuzy Threads - Hide images in signatures // @description This script will automatically hide all images in signatures under each forum post // @version 1.0 // @license MIT // @icon http://ps.fscache.com/styles/style1/images/statusicon/forum_old.gif // @include /^https?://(www\.)?planetsuzy\.org/showthread\.php/ // @include /^https?:\/\/(www\.)?planetsuzy\.org\/t\d+[\w-]+\.html$/ // ==/UserScript== const decoratePosts = function() { document.querySelectorAll('table[id^=post] [id^=td_post_]') .forEach(function (el) { let sigContext = false; for (let i = el.childNodes.length - 1; i >= 0; i--) { let node = el.childNodes[i]; if (node.nodeType === Node.COMMENT_NODE && node.textContent.trim() === '/ sig') { sigContext = true; } else if (node.nodeType === Node.COMMENT_NODE && node.textContent.trim() === 'sig') { sigContext = false; } else if (sigContext && typeof node.querySelectorAll === 'function') { node.querySelectorAll('img') .forEach(function (img) { img.style.display = 'none'; }); } } }); }; decoratePosts();