Files
FixIt/assets/js/custom.js.example
T
2024-02-23 17:27:49 +08:00

36 lines
617 B
Plaintext

/**
* Custom JavaScript for FixIt blog site.
* @author @Lruihao https://lruihao.cn
*/
class FixItBlog {
/**
* say hello
* you can define your own functions below
* @returns {FixItBlog}
*/
hello() {
console.log('custom.js: Hello FixIt!');
return this;
}
/**
* initialize
* @returns {FixItBlog}
*/
init() {
this.hello();
return this;
}
}
/**
* immediate execution
*/
(() => {
window.fixitBlog = new FixItBlog();
// it will be executed when the DOM tree is built
document.addEventListener('DOMContentLoaded', () => {
window.fixitBlog.init();
});
})();