redesign 2023
This commit is contained in:
35
themes/FixIt/assets/js/custom.js.example
Normal file
35
themes/FixIt/assets/js/custom.js.example
Normal file
@ -0,0 +1,35 @@
|
||||
/**
|
||||
* Custom javascript for FixIt site.
|
||||
* @author @Lruihao https://lruihao.cn
|
||||
*/
|
||||
const FixItCustom = new (function () {
|
||||
/**
|
||||
* Hello World
|
||||
* You can define your own functions below.
|
||||
* @returns {FixItCustom}
|
||||
*/
|
||||
this.hello = () => {
|
||||
console.log('FixItCustom echo: Hello FixIt!');
|
||||
return this;
|
||||
};
|
||||
/**
|
||||
* Initialize.
|
||||
* @returns {FixItCustom}
|
||||
*/
|
||||
this.init = () => {
|
||||
// Custom infos.
|
||||
this.hello();
|
||||
return this;
|
||||
};
|
||||
})();
|
||||
|
||||
/**
|
||||
* Immediate.
|
||||
*/
|
||||
(() => {
|
||||
FixItCustom.init();
|
||||
// It will be executed when the DOM tree is built.
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
// FixItCustom.init();
|
||||
});
|
||||
})();
|
Reference in New Issue
Block a user