Files
FixIt/assets/js/_custom.js
T
2022-01-13 21:09:55 +08:00

36 lines
677 B
JavaScript

/**
* @author @Lruihao https://lruihao.cn
* @description Custom javascript for the hugo theme FixIt.
*/
const CustomJS = new (function () {
/**
* Hello World
* You can define your own functions below.
* @returns {CustomJS}
*/
this.hello = () => {
console.log('Hello CustomJS!');
return this;
}
/**
* Initialize.
* @returns {CustomJS}
*/
this.init = () => {
// Custom infos.
this.hello();
return this;
};
})();
/**
* Immediate.
*/
(() => {
CustomJS.init();
// It will be executed when the DOM tree is built.
document.addEventListener('DOMContentLoaded', () => {
console.log('DOM content loaded!')
});
})();