Last active
May 30, 2024 11:42
-
-
Save BroFox86/8214b9d7aa1a1119ef304011256a612d to your computer and use it in GitHub Desktop.
Revisions
-
BroFox86 revised this gist
May 30, 2024 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ function listenWindowResize() { let width = window.innerWidth; let allowReset = true; -
BroFox86 revised this gist
May 30, 2024 . 1 changed file with 7 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,14 @@ function listenResize() { let width = window.innerWidth; let allowReset = true; window.addEventListener("resize", () => { if (width === window.innerWidth) { return; } width = window.innerWidth; if (!allowReset) { return; } -
BroFox86 revised this gist
May 28, 2024 . No changes.There are no files selected for viewing
-
BroFox86 created this gist
May 28, 2024 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ function listenResize() { let allowReset = true; window.addEventListener("resize", () => { if (!allowReset) { return; } allowReset = false; setTimeout(() => { allowReset = true; }, 1000); // Code... }); }