34 lines
806 B
JavaScript
34 lines
806 B
JavaScript
import { headerToggle, headerScrollVisibility } from './header.js';
|
|
import { copyLink } from './share.js';
|
|
|
|
// TEMP, with includeHTML() --------------------------------------
|
|
|
|
window.onload = async function () {
|
|
await runIncludeHTML();
|
|
initAfterLoad();
|
|
};
|
|
|
|
function runIncludeHTML() {
|
|
if (typeof includeHTML === "function") {
|
|
const result = includeHTML();
|
|
|
|
if (result instanceof Promise) {
|
|
return result;
|
|
}
|
|
}
|
|
|
|
return Promise.resolve();
|
|
}
|
|
|
|
|
|
/// INIT --------------------------------------------------------
|
|
|
|
// Note: une fois que IncludeHTML() est supprimé, on peut supprimer tout le temp au dessus
|
|
// remplacer `function initAfterLoad()` par ↓
|
|
// window.onload = async function () { }
|
|
|
|
function initAfterLoad() {
|
|
headerToggle();
|
|
headerScrollVisibility();
|
|
copyLink();
|
|
}
|