@ablula/egg-yuque-viewer
Advanced tools
Comparing version 0.2.3 to 0.2.4-beta.0
@@ -155,14 +155,19 @@ 'use strict'; | ||
<link rel="shortcut icon" href="${config.favicon || 'favicon.ico'}"> | ||
<link rel="stylesheet" | ||
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.highlightCssUrl || '//cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.5.1/build/styles/default.min.css'}"> | ||
<script src="${config.highlightJsUrl || '//cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.5.1/build/highlight.min.js'}"></script> | ||
<link rel="stylesheet" | ||
href="${config.highlightTheme || 'https://cdn.jsdelivr.net/npm/highlightjs@9.16.2/styles/github-gist.css'}"> | ||
${themeStyleTag || ''} | ||
<script> | ||
function initHljsDelay(time = 200) { | ||
setTimeout(() => { | ||
document.querySelectorAll('pre.ne-codeblock').forEach((el) => { | ||
hljs.highlightElement(el); | ||
}); | ||
}, time); | ||
} | ||
document.addEventListener('DOMContentLoaded', (event) => { | ||
document.querySelectorAll('pre.ne-codeblock').forEach((el) => { | ||
hljs.highlightElement(el); | ||
}); | ||
initHljsDelay(); | ||
}); | ||
@@ -173,5 +178,3 @@ let previousUrl = ""; | ||
previousUrl = window.location.href; | ||
document.querySelectorAll('pre.ne-codeblock').forEach((el) => { | ||
hljs.highlightElement(el); | ||
}); | ||
initHljsDelay(); | ||
} | ||
@@ -178,0 +181,0 @@ }); |
{ | ||
"name": "@ablula/egg-yuque-viewer", | ||
"author": "mark.ck", | ||
"version": "0.2.3", | ||
"version": "0.2.4-beta.0", | ||
"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
25356
672