1
0
mirror of https://gitee.com/bitdance-team/chrome-extension synced 2025-01-31 23:30:26 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee

38 lines
1.2 KiB
JavaScript
Raw Normal View History

$(function() {
console.log("[BitDance extension] 学生助手插件 - 阅读全文自动展开模块加载成功");
// 删除DOM
function removeDOM(querySelector) {
let element = document.querySelector(querySelector)
if (element != null) {
element.parentNode.removeChild(element);
}
}
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;
}
})