nodebb-plugin-katex2 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/static/js/render.js +7 -4
package/package.json
CHANGED
package/static/js/render.js
CHANGED
|
@@ -223,6 +223,7 @@
|
|
|
223
223
|
* Рендеринг всех постов (async)
|
|
224
224
|
*/
|
|
225
225
|
async function renderAllPosts() {
|
|
226
|
+
console.log("[KaTeX] Try rendering");
|
|
226
227
|
// Проверяем наличие формул
|
|
227
228
|
if (!hasMathContent()) {
|
|
228
229
|
console.log("[KaTeX] No math content found, skipping");
|
|
@@ -262,7 +263,9 @@
|
|
|
262
263
|
*/
|
|
263
264
|
function init() {
|
|
264
265
|
// Первый рендеринг
|
|
265
|
-
|
|
266
|
+
setTimeout(function () {
|
|
267
|
+
renderAllPosts();
|
|
268
|
+
}, 500);
|
|
266
269
|
|
|
267
270
|
// События NodeBB для динамического контента
|
|
268
271
|
|
|
@@ -270,21 +273,21 @@
|
|
|
270
273
|
window.addEventListener("action:posts.loaded", function () {
|
|
271
274
|
setTimeout(function () {
|
|
272
275
|
renderAllPosts();
|
|
273
|
-
},
|
|
276
|
+
}, 500);
|
|
274
277
|
});
|
|
275
278
|
|
|
276
279
|
// Когда открывается тема
|
|
277
280
|
window.addEventListener("action:topic.loaded", function () {
|
|
278
281
|
setTimeout(function () {
|
|
279
282
|
renderAllPosts();
|
|
280
|
-
},
|
|
283
|
+
}, 500);
|
|
281
284
|
});
|
|
282
285
|
|
|
283
286
|
// Когда происходит навигация
|
|
284
287
|
window.addEventListener("action:ajaxify.end", function () {
|
|
285
288
|
setTimeout(function () {
|
|
286
289
|
renderAllPosts();
|
|
287
|
-
},
|
|
290
|
+
}, 800);
|
|
288
291
|
});
|
|
289
292
|
|
|
290
293
|
// Когда обновляется превью в редакторе
|