diff options
Diffstat (limited to 'src/app/js')
-rw-r--r-- | src/app/js/browser.js | 4 | ||||
-rw-r--r-- | src/app/js/events.js | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/app/js/browser.js b/src/app/js/browser.js index 7ca2729..c1da9b5 100644 --- a/src/app/js/browser.js +++ b/src/app/js/browser.js @@ -555,8 +555,8 @@ search.addEventListener("keyup", () => { } }) -let events = ["scroll", "mousedown", "touchdown"]; -events.forEach((event) => { +let mouse_events = ["scroll", "mousedown", "touchdown"]; +mouse_events.forEach((event) => { browser.addEventListener(event, () => { Preview.hide(); diff --git a/src/app/js/events.js b/src/app/js/events.js new file mode 100644 index 0000000..cced4a7 --- /dev/null +++ b/src/app/js/events.js @@ -0,0 +1,3 @@ +const EventEmitter = require("events"); +class Emitter extends EventEmitter {}; +const events = new Emitter(); |