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