Up-in-the-Air – commitdiff

You can use Git to clone the repository via the web URL. Download snapshot (zip)
Bugfix: pause on scroll if game is running, instead of the opposite
authorJulian Fietkau <git@fietkau.software>
Thu, 3 Oct 2024 20:12:52 +0000 (22:12 +0200)
committerJulian Fietkau <git@fietkau.software>
Thu, 3 Oct 2024 20:12:52 +0000 (22:12 +0200)
main.js

diff --git a/main.js b/main.js
index 77d1a2fd8c1f8b6ac592cfd82f71771455735829..7be04c7b17ae2942c4bd71e0bf84f0b5a9a75844 100644 (file)
--- a/main.js
+++ b/main.js
@@ -2114,7 +2114,7 @@ game['fn'].start = () => {
   });
 
   window.addEventListener('scroll', () => {
-    if(['gameplay', 'openingcutscene', 'endingcutscene'].includes(game.ui.currentPage)) {
+    if(!['gameplay', 'openingcutscene', 'endingcutscene'].includes(game.ui.currentPage)) {
       return;
     }
     let bbox = game.ui.root.querySelector('canvas').getBoundingClientRect();