mirror of
https://github.com/next-theme/hexo-theme-next.git
synced 2026-01-18 18:33:42 +00:00
Fix: bind DOMContentLoaded event on document instead of window
This commit is contained in:
parent
eee457cab6
commit
cd5e54193b
@ -1,6 +1,6 @@
|
||||
/* global instantsearch, algoliasearch, CONFIG */
|
||||
|
||||
window.addEventListener('DOMContentLoaded', () => {
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
const algoliaSettings = CONFIG.algolia;
|
||||
const { indexName, appID, apiKey } = algoliaSettings;
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
/* global CONFIG */
|
||||
|
||||
window.addEventListener('DOMContentLoaded', () => {
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
'use strict';
|
||||
|
||||
var doSaveScroll = () => {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
/* global CONFIG */
|
||||
|
||||
window.addEventListener('DOMContentLoaded', () => {
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
// Popup Window
|
||||
let isfetched = false;
|
||||
let datas;
|
||||
|
||||
@ -107,7 +107,7 @@ NexT.boot.motion = function() {
|
||||
NexT.utils.updateSidebarPosition();
|
||||
};
|
||||
|
||||
window.addEventListener('DOMContentLoaded', () => {
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
NexT.boot.registerEvents();
|
||||
NexT.boot.refresh();
|
||||
NexT.boot.motion();
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
/* global NexT, CONFIG, Velocity */
|
||||
|
||||
window.addEventListener('DOMContentLoaded', () => {
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
|
||||
var isRight = CONFIG.sidebar.position === 'right';
|
||||
var SIDEBAR_WIDTH = CONFIG.sidebar.width || 320;
|
||||
|
||||
@ -80,7 +80,7 @@ NexT.utils.getAffixParam = function() {
|
||||
};
|
||||
};
|
||||
|
||||
window.addEventListener('DOMContentLoaded', () => {
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
|
||||
Affix.init(document.querySelector('.sidebar-inner'), NexT.utils.getAffixParam());
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user