mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 23:38:56 +00:00
36 lines
617 B
Plaintext
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();
|
|
});
|
|
})();
|