您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Makes small hyperlinks in comments on MetaFilter.com and all subsites larger. Helpful on mobile devices.
当前为
// ==UserScript== // @name MetaFilter embiggen small hyperlinks // @description Makes small hyperlinks in comments on MetaFilter.com and all subsites larger. Helpful on mobile devices. // @author Tehhund // @match *://*.metafilter.com/* // @run-at document-idle // @version 7 // @namespace https://gf.qytechs.cn/users/324881 // ==/UserScript== function embiggen() { let allHyperlinks = []; let allCommentDivs = document.getElementsByClassName('comments'); allCommentDivs = Array.from(allCommentDivs).filter( function(div) { return div.previousSibling.tagName == 'A'; }); // Some "comment" divs are actually not comments. Real comments are always preceded by an anchor tag so this filters out any not-actually-comment divs. for (currentDiv of allCommentDivs) { // get all the hyperlinks from within comment divs. allLinksInCurrentDiv = Array.from(currentDiv.getElementsByTagName('A')); allHyperlinks = allHyperlinks.concat(allLinksInCurrentDiv); } for (let tag of allHyperlinks) { // Check hyperlink font size and increase if it's less than 17px let compStyles = window.getComputedStyle(tag); let compFontSize = parseFloat(compStyles.getPropertyValue('font-size')); if (compFontSize < 17) tag.style.fontSize = '130%'; } } // Observe the main content div for changes such as new comments or adding a Favorite, and run embiggen() again. // Temporarily removing due to performance issues. Will reenable if I can find a performant way to do this. //const mutationObserver = new //MutationObserver(embiggen); //mutationObserver.observe(document.getElementById('posts'), { attributes: true, childList: true, subtree: true }) embiggen();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址