2022-02-04 21:29:00 +08:00
|
|
|
$(function() {
|
2022-02-10 02:26:48 +08:00
|
|
|
console.log("[BitDance extension] 学生助手插件 - 阅读全文自动展开模块加载成功");
|
|
|
|
// 删除DOM
|
2022-02-04 21:29:00 +08:00
|
|
|
function removeDOM(querySelector) {
|
|
|
|
let element = document.querySelector(querySelector)
|
|
|
|
if (element != null) {
|
|
|
|
element.parentNode.removeChild(element);
|
|
|
|
}
|
|
|
|
}
|
2022-02-10 02:26:48 +08:00
|
|
|
switch (window.location.host) {
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
|
|
|
|
case "blog.csdn.net": // CSDN博客
|
|
|
|
removeDOM(".hide-article-box");
|
|
|
|
$(".article_content").removeAttr('style');
|
|
|
|
window.onload = () => {
|
|
|
|
// 代码块自动展开
|
|
|
|
document.querySelectorAll("pre").forEach(targetNode => {
|
|
|
|
removeDOM(".hide-preCode-box");
|
|
|
|
if (targetNode.classList.contains("set-code-hide")) {
|
|
|
|
targetNode.classList.remove("set-code-hide");
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case "www.it1352.com": // it1352
|
|
|
|
console.log("[BitDance extension] 学生助手插件 - it1352");
|
|
|
|
window.onload = () => {
|
|
|
|
$('.arc-body-main').height("initial")
|
|
|
|
$('.arc-body-main-more').remove()
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2022-02-04 21:29:00 +08:00
|
|
|
}
|
2022-02-10 02:26:48 +08:00
|
|
|
})
|