Skip to content

Commit

Permalink
[bug] fix kancloud js & firefox show style & fix search highlight (#926)
Browse files Browse the repository at this point in the history
Co-authored-by: admin <you@example.com>
  • Loading branch information
ydf and admin authored Jan 9, 2024
1 parent e64bee1 commit 5504c43
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion static/css/kancloud.css
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ table>tbody>tr:hover {
color: #ffffff;
}

.m-manual .markdown-body .search-highlight {
.m-manual .search-highlight {
background-color: #FFFF00 !important;
font-style: normal;
}
Expand Down
2 changes: 1 addition & 1 deletion static/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ body .scrollbar-track-color {
line-height: 100%;
cursor: pointer;
margin-top: -10px;
margin-left: -45px;
margin-left: -44px;
border: 0;
background-color: transparent
}
Expand Down
11 changes: 4 additions & 7 deletions static/js/kancloud.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "/";
Expand Down

0 comments on commit 5504c43

Please sign in to comment.