@ablula/egg-yuque-viewer
Advanced tools
Comparing version 0.2.3-beta.1 to 0.2.3
@@ -157,6 +157,6 @@ 'use strict'; | ||
href="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.5.1/build/styles/default.min.css"> | ||
<script src="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.5.1/build/highlight.min.js"></script> | ||
<link href="${npmCssUrl}" rel="stylesheet"> | ||
<link rel="stylesheet" | ||
href="${config.highlightTheme || 'https://cdn.jsdelivr.net/npm/highlightjs@9.16.2/styles/github-gist.css'}"> | ||
<script src="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.5.1/build/highlight.min.js"></script> | ||
<link href="${npmCssUrl}" rel="stylesheet"> | ||
${themeStyleTag || ''} | ||
@@ -169,2 +169,12 @@ <script> | ||
}); | ||
let previousUrl = ""; | ||
const observer = new MutationObserver(() => { | ||
if (window.location.href !== previousUrl) { | ||
previousUrl = window.location.href; | ||
document.querySelectorAll('pre.ne-codeblock').forEach((el) => { | ||
hljs.highlightElement(el); | ||
}); | ||
} | ||
}); | ||
observer.observe(document, { subtree: true, childList: true }); | ||
</script> | ||
@@ -171,0 +181,0 @@ </head> |
{ | ||
"name": "@ablula/egg-yuque-viewer", | ||
"author": "mark.ck", | ||
"version": "0.2.3-beta.1", | ||
"version": "0.2.3", | ||
"description": "egg plugin for yuque viewer", | ||
@@ -6,0 +6,0 @@ "eggPlugin": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
25261
669