summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-02-19 07:38:11 +0300
committerAndrew Dolgov <[email protected]>2021-02-19 07:38:11 +0300
commit21b3595c8fc71aaa869fe0e50c910e54851e39e7 (patch)
tree06bfbbf81e835485837dd608fdb6512a349d952d
parente24b5ac5785c3c3bff23dd7d367e1f6fd1982999 (diff)
fix for lack of prototype
-rw-r--r--init.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/init.js b/init.js
index 4a31399..18733dc 100644
--- a/init.js
+++ b/init.js
@@ -1,14 +1,14 @@
require(['dojo/_base/kernel', 'dojo/ready'], function (dojo, ready) {
ready(function () {
- Event.observe(window, "focus", function() {
- $$("video").forEach((vid) => {
+ window.addEventListener("focus", function() {
+ App.findAll("video").forEach((vid) => {
if (vid.getAttribute("autoplay") == 1 && vid.paused)
vid.play();
})
});
- Event.observe(window, "blur", function() {
- $$("video").forEach((vid) => {
+ window.addEventListener("blur", function() {
+ App.findAll("video").forEach((vid) => {
if (vid.getAttribute("autoplay") == 1 && !vid.paused)
vid.pause();
})