We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 509815e commit 40e5141Copy full SHA for 40e5141
source/js/next-boot.js
@@ -47,7 +47,18 @@ NexT.boot.refresh = function() {
47
background: 'var(--content-bg-color)'
48
});
49
CONFIG.lazyload && window.lozad('.post-body img').observe();
50
- CONFIG.pangu && window.pangu.spacingElementByTagName('main');
+ if (CONFIG.pangu) {
51
+ // Polyfill for requestIdleCallback if not supported
52
+ if (!window.requestIdleCallback) {
53
+ window.requestIdleCallback = function(cb) {
54
+ cb({
55
+ didTimeout : false,
56
+ timeRemaining: () => 100
57
+ });
58
+ };
59
+ }
60
+ [...document.getElementsByTagName('main')].forEach(e => window.pangu.spacingNode(e));
61
62
63
CONFIG.exturl && NexT.utils.registerExtURL();
64
NexT.utils.wrapTableWithBox();
0 commit comments