您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
硬朗风网页:将网页圆角变为方角!
// ==UserScript== // @name Square Corners for All Elements - 全局方角 // @namespace http://tampermonkey.net/ // @version Beta // @description 硬朗风网页:将网页圆角变为方角! // @author ZiLite // @license MIT // @match *://*/* // @grant none // ==/UserScript== (function() { 'use strict'; // 创建一个高优先级样式 const css = ` body *:not(.specific-class-1):not(.specific-class-2):not(.specific-class-3) { border-radius: 0 !important; } `; // 将样式添加到页面 const style = document.createElement('style'); document.head.appendChild(style); style.sheet.insertRule(css, style.sheet.cssRules.length); // 监听DOM变化,动态应用样式 const observer = new MutationObserver(mutations => { mutations.forEach(mutation => { if (mutation.type === 'childList' || mutation.type === 'attributes') { Array.from(mutation.addedNodes).forEach(node => { if (node.nodeType === Node.ELEMENT_NODE) { applyStylesToNode(node); } }); } }); }); // 应用样式到节点 function applyStylesToNode(node) { if (!node.classList.contains('specific-class-1') && !node.classList.contains('specific-class-2') && !node.classList.contains('specific-class-3')) { node.style.borderRadius = '0 !important'; } } // 观察整个文档 observer.observe(document.body, { childList: true, attributes: true, subtree: true }); // 初始应用样式 document.querySelectorAll('body *').forEach(applyStylesToNode); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址