This repository has been archived by the owner on Jan 20, 2025. It is now read-only.
generated from A-kirami/nonebot-plugin-template
-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
96 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
() => { | ||
/** | ||
* @param {string} selector | ||
* @param {(obj: HTMLElement) => any} callback | ||
*/ | ||
const executeIfExist = (selector, callback) => { | ||
const obj = document.querySelector(selector); | ||
if (obj) callback(obj); | ||
}; | ||
|
||
// 给内容加上 padding | ||
executeIfExist('div.wiki-detail-body', (obj) => (obj.style.padding = '20px')); | ||
|
||
// 隐藏 Header 避免遮挡页面 | ||
executeIfExist('div.wiki-header', (obj) => (obj.style.display = 'none')); | ||
|
||
// 隐藏关注按钮 | ||
executeIfExist( | ||
'div.user-box > button', | ||
(obj) => (obj.style.display = 'none') | ||
); | ||
|
||
// 删掉视频播放器 | ||
for (const it of document.querySelectorAll('div.video-play-wrapper')) | ||
it.remove(); | ||
|
||
// 展开所有选项卡内容 | ||
for (const it of document.querySelectorAll('div.slide-item')) | ||
it.classList.add('active'); | ||
|
||
// 删掉点赞和收藏按钮 | ||
executeIfExist('div.article-options', (obj) => obj.remove()); | ||
|
||
// 删掉底部边距 | ||
executeIfExist( | ||
'div.wiki-detail-body', | ||
(obj) => (obj.style.marginBottom = '0') | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters