mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2025-06-07 22:14:04 +08:00
修复内置手册自定义样式无效的bug
This commit is contained in:
parent
a554570b5a
commit
717f674017
@ -97,9 +97,10 @@ highlightManual = (selector, text) => {
|
||||
|
||||
// 初始化
|
||||
init = () => {
|
||||
$("#mainlist").fadeOut(0);
|
||||
$("#options").fadeOut(0);
|
||||
$("#manual").fadeOut(0);
|
||||
$("#mainlist").fadeOut();
|
||||
$("#options").fadeOut();
|
||||
$("#manual").fadeOut();
|
||||
$('link[name="manual"]').remove();
|
||||
$("html").niceScroll();
|
||||
$("#manual").niceScroll();
|
||||
}
|
||||
@ -174,17 +175,20 @@ utools.onPluginEnter( async ({ code, type, payload }) => {
|
||||
}
|
||||
break;
|
||||
case "devdocs":
|
||||
assetDir = '';
|
||||
window.dirs = {
|
||||
docPath: allFts[code].url.slice(0, -11),
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
// 自定义 CSS、JS情况下
|
||||
assetDir && window.readDir(assetDir, (err, files) => {
|
||||
window.readDir(assetDir, (err, files) => {
|
||||
if (!err) {
|
||||
$('[href="assets/manual.css"]').remove();
|
||||
files.forEach(file => {
|
||||
$('head').append(`<link rel="stylesheet" href="${assetDir}/${file}">`)
|
||||
$('head').append(`<link rel="stylesheet" href="${assetDir}/${file}" name="manual">`)
|
||||
})
|
||||
} else {
|
||||
$('head').append('<link rel="stylesheet" href="assets/manual.css" name="manual">')
|
||||
}
|
||||
})
|
||||
// 读取目录文件
|
||||
|
@ -6,7 +6,6 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<link rel="stylesheet" href="assets/style.css">
|
||||
<link rel="stylesheet" href="assets/manual.css">
|
||||
<link rel="stylesheet" href="assets/options.css">
|
||||
<link rel="stylesheet" href="assets/prism.css">
|
||||
<script src="assets/jquery-3.3.1.min.js"></script>
|
||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user