preload分割

This commit is contained in:
fofolee
2024-12-28 16:35:56 +08:00
parent 3ffe0d2c82
commit e1c31de4c1
9 changed files with 589 additions and 522 deletions

38
plugin/lib/showDocs.js Normal file
View File

@@ -0,0 +1,38 @@
const runUbrowser = (path) => {
window.utools.ubrowser
.goto(path)
.css(
`
.ant-modal-content,
.ant-modal-mask,
[class*='index-module_contentWrapper'],
[class*='index-module_reward'],
[class*='ReaderLayout-module_asideWrapper'],
[class*='CornerBubble-module_cornerBubble'],
[class*='DocReader-module_comment'],
#header,
#footer {
display: none
}`
)
.run({
width: 980,
height: 750,
});
};
const docsRepoUrl = "https://www.yuque.com/fofolee/qcdocs3";
const showUb = {
help: function (path = "") {
runUbrowser(docsRepoUrl + "/bg31vl" + path);
},
docs: function (path = "") {
runUbrowser(docsRepoUrl + "/pt589p" + path);
},
changelog: function (path = "") {
runUbrowser(docsRepoUrl + "/ucnd2o" + path);
},
};
module.exports = showUb;