温馨提醒
如果文章内容或图片资源失效,请留言反馈,我们会及时处理,谢谢
本文最后更新于2024年12月28日,已超过 180天没有更新
// ==UserScript==
// @name CSDN文库免vip阅读全文,解锁复制限制
// @namespace http://tampermonkey.net/
// @version 1.0
// @description CSDN文库阅读全文,去除VIP登录遮罩,解锁鼠标复制功能
// @author icescat
// @match *://*.csdn.net/*
// @grant none
// @license MIT
// ==/UserScript==
(function() {
'use strict';
const adjustArticle = () => {
// 移除遮罩层
document.querySelectorAll('.open, .vip').forEach(el => el.remove());
// 展开被限制高度的内容
const articleContainer = document.querySelector('.article-box .cont.first-show[data-v-6487a68f]');
if (articleContainer) {
articleContainer.style.maxHeight = 'none';
}
};
// 启用复制功能
const enableCopy = () => {
document.body.oncopy = null;
document.oncopy = null;
document.querySelectorAll('*').forEach(el => {
el.style.userSelect = 'auto';
});
};
// 使用MutationObserver来监视文档的变化
const observer = new MutationObserver((mutations) => {
mutations.forEach((mutation) => {
if (mutation.addedNodes.length) {
adjustArticle();
enableCopy();
}
});
});
observer.observe(document.body, {
childList: true,
subtree: true
});
// 页面加载时尝试执行一次
window.addEventListener('load', () => {
adjustArticle();
enableCopy();
});
})();
插件功能介绍:
✅ 免登陆复制 ✅ 控制登陆弹窗 ✅ 去除广告模块 ✅ 免登陆添加沉浸式阅读按钮(隐藏侧边栏功能) ✅ VIP文章解锁 ✅ 部分专栏文章解锁 ✅ 知乎盐选文章解锁 ✅ CSDN会员文件下载 image.png 看到这个按钮就可以点击解锁
油猴脚本地址:https://greasyfork.org/zh-CN/scripts/519970
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系客服QQ3387285338进行处理。


评论0+