mirror of
https://github.com/next-theme/hexo-theme-next.git
synced 2026-01-18 18:33:42 +00:00
Patch pangu.js
This commit is contained in:
parent
509815e558
commit
40e5141e69
@ -47,7 +47,18 @@ NexT.boot.refresh = function() {
|
||||
background: 'var(--content-bg-color)'
|
||||
});
|
||||
CONFIG.lazyload && window.lozad('.post-body img').observe();
|
||||
CONFIG.pangu && window.pangu.spacingElementByTagName('main');
|
||||
if (CONFIG.pangu) {
|
||||
// Polyfill for requestIdleCallback if not supported
|
||||
if (!window.requestIdleCallback) {
|
||||
window.requestIdleCallback = function(cb) {
|
||||
cb({
|
||||
didTimeout : false,
|
||||
timeRemaining: () => 100
|
||||
});
|
||||
};
|
||||
}
|
||||
[...document.getElementsByTagName('main')].forEach(e => window.pangu.spacingNode(e));
|
||||
}
|
||||
|
||||
CONFIG.exturl && NexT.utils.registerExtURL();
|
||||
NexT.utils.wrapTableWithBox();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user