aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
author0neGal <mail@0negal.com>2024-01-20 02:14:18 +0100
committer0neGal <mail@0negal.com>2024-01-20 02:14:18 +0100
commitbc34025c7341bdbc9a31e8a16040e7ec6b89fe9b (patch)
tree9f5db834a3a4a0b1b49199ed2f9234871fec05dd /src
parentc03ce1dc5b1e320a94ef6307aa4c32132c5bf33c (diff)
downloadViper-bc34025c7341bdbc9a31e8a16040e7ec6b89fe9b.tar.gz
Viper-bc34025c7341bdbc9a31e8a16040e7ec6b89fe9b.zip
added src/app/js/events.js
Diffstat (limited to 'src')
-rw-r--r--src/app/index.html1
-rw-r--r--src/app/js/browser.js4
-rw-r--r--src/app/js/events.js3
3 files changed, 6 insertions, 2 deletions
diff --git a/src/app/index.html b/src/app/index.html
index ffb8699..d3de578 100644
--- a/src/app/index.html
+++ b/src/app/index.html
@@ -321,6 +321,7 @@
<script src="js/misc.js"></script>
<script src="js/mods.js"></script>
<script src="js/toast.js"></script>
+ <script src="js/events.js"></script>
<script src="js/popups.js"></script>
<script src="js/tooltip.js"></script>
<script src="js/browser.js"></script>
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();