Display workout stats
This commit is contained in:
@@ -9,10 +9,15 @@
|
||||
<script src="https://cdn.tailwindcss.com"></script>
|
||||
<script src="https://cdn.plot.ly/plotly-2.14.0.min.js"></script>
|
||||
<script>
|
||||
let doit;
|
||||
function debounce(func, timeout = 300) {
|
||||
let timer;
|
||||
return (...args) => {
|
||||
clearTimeout(timer);
|
||||
timer = setTimeout(() => { func.apply(this, args); }, timeout);
|
||||
};
|
||||
}
|
||||
window.addEventListener('resize', () => {
|
||||
clearTimeout(doit);
|
||||
doit = setTimeout(window.dispatchEvent(new Event('resize')), 100);
|
||||
debounce(() => window.dispatchEvent(new Event('resize')))
|
||||
})
|
||||
</script>
|
||||
</head>
|
||||
|
||||
Reference in New Issue
Block a user