// ==UserScript== // @name CSDN 代码复制限制 // @namespace http://tampermonkey.net/ // @version 0.1 // @description 用于解除 CSDN 博客内代码复制限制 // @author Bright Xu // @match *.csdn.net/* // @icon https://g.csdnimg.cn/static/logo/favicon32.ico // @grant none // ==/UserScript== function removeLimit() { if (window.csdn) { if (window.csdn.copyright) window.csdn.copyright.textData = ''; if (window.csdn.loginBox) window.csdn.loginBox.show = function(){} } const d = document.getElementById('article_content'); if(d) d.style.height = 'unset'; } (function() { 'use strict'; const style = document.createElement('style'); style.innerHTML = ` #articleSearchTip, #csdn-redpack, .csdn-redpack-container, .toolbar-advert, .csdn-reapck-select { display: none !important; } .hide-article-box { display: none !important; } #content_views { user-select: unset !important; -webkit-user-select: unset !important; } `; document.head.append(style); if (window.$ !== undefined) $('pre,code').css('user-select', 'unset'); removeLimit() setInterval(function() { removeLimit(); }, 3000); })();
功能介绍
解除未登录时,代码复制限制(仅限Markdown文章)
解除必须关注博主等条件才能继续阅读下文限制
隐藏内容需要回复可以看见
回复
楼主辛苦了,谢谢楼主,楼主好人一生平安!
楼主辛苦了,谢谢楼主,楼主好人一生平安!
楼主辛苦了,谢谢楼主,楼主好人一生平安!