[bug] fix kancloud js & firefox show style & fix search highlight (#926)

Co-authored-by: admin <you@example.com>
This commit is contained in:
ydf
2024-01-09 19:54:31 +08:00
committed by GitHub
parent e64bee1e1e
commit 5504c4350b
3 changed files with 6 additions and 9 deletions

View File

@@ -189,16 +189,13 @@ function loadDocument($url, $id, $callback) {
},
success: function ($res) {
if ($res.errcode === 0) {
renderPage($res.data);
$body = $res.data.body;
var data = $res.data;
if (typeof $callback === "function") {
$body = $callback(body);
data.body = $callback(data.body);
}
renderPage(data);
loadCopySnippets();
events.data($id, $res.data);
events.data($id, data);
events.trigger('article.open', { $url: $url, $id: $id });
} else if ($res.errcode === 6000) {
window.location.href = "/";