mirror of
https://github.com/zen-browser/components.git
synced 2025-07-10 13:45:30 +02:00
✨ Added disable all component handling
This commit is contained in:
parent
d853fa8de4
commit
2f2881814e
3 changed files with 99 additions and 28 deletions
|
@ -48,6 +48,7 @@ var ZenThemesCommon = {
|
|||
);
|
||||
}
|
||||
}
|
||||
|
||||
return this.themes;
|
||||
},
|
||||
|
||||
|
@ -105,4 +106,15 @@ var ZenThemesCommon = {
|
|||
}
|
||||
};
|
||||
},
|
||||
|
||||
debounce(mainFunction, wait) {
|
||||
let timerFlag;
|
||||
|
||||
return (...args) => {
|
||||
clearTimeout(timerFlag);
|
||||
timerFlag = setTimeout(() => {
|
||||
mainFunction(...args);
|
||||
}, wait);
|
||||
};
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue