diff --git a/src/utils/enhance-content.js b/src/utils/enhance-content.js index 449c87ec..97077c8f 100644 --- a/src/utils/enhance-content.js +++ b/src/utils/enhance-content.js @@ -244,7 +244,8 @@ function _enhanceContent(content, opts = {}) { } if (postEnhanceDOM) { - postEnhanceDOM(dom); // mutate dom + queueMicrotask(() => postEnhanceDOM(dom)); + // postEnhanceDOM(dom); // mutate dom } enhancedContent = dom.innerHTML; diff --git a/src/utils/states.js b/src/utils/states.js index ab422a7d..9328f8dd 100644 --- a/src/utils/states.js +++ b/src/utils/states.js @@ -180,7 +180,7 @@ export function saveStatus(status, instance, opts) { // THREAD TRAVERSER if (!skipThreading) { - requestAnimationFrame(() => { + queueMicrotask(() => { threadifyStatus(status, instance); if (status.reblog) { threadifyStatus(status.reblog, instance);