您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
优化 CSDN 体验
当前为
// ==UserScript== // @name CSDN 优化 // @namespace http://tampermonkey.net/ // @version 0.3.1 // @description 优化 CSDN 体验 // @author share121 // @match https://blog.csdn.net/*/article/details/* // @icon https://g.csdnimg.cn/static/logo/favicon32.ico // @grant none // @license MIT // ==/UserScript== window.addEventListener( 'copy', e => { e.stopImmediatePropagation() e.stopPropagation() }, !0 ) document.querySelectorAll('pre, code').forEach(e => { e.style.cssText += '-webkit-touch-callout:auto;-webkit-user-select:auto;-khtml-user-select:auto;-moz-user-select:auto;-ms-user-select:auto;user-select:auto;' }) document.querySelectorAll('.hljs-button.signin').forEach(e => { e.onclick = a => { a.stopPropagation() navigator.clipboard.writeText(e.parentNode.innerText).then(() => { e.setAttribute('data-title', '复制成功') setTimeout(() => { e.setAttribute('data-title', '复制') }, 3000) }) } e.setAttribute('data-title', '复制') }) { let tmp = setInterval(() => { let button = document.querySelector('#passportbox > span') if (button) { clearInterval(tmp) button.click() } }) } document.querySelector('#article_content').style.height = 'auto' document.querySelector('.hide-article-box.hide-article-pos')?.remove() document.querySelector('#blogExtensionBox')?.remove() document.querySelectorAll('.look-more-preCode').forEach(e => e.click())