« get me outta code hell

Actually switch song as soon as reasonable - interactive-bgm - Browser extension that adds background music based on the site you're browsing
about summary refs log tree commit diff
path: root/extension/interactive-bgm.js
diff options
context:
space:
mode:
authorFlorrie <towerofnix@gmail.com>2019-03-24 13:51:30 -0300
committerFlorrie <towerofnix@gmail.com>2019-03-24 13:51:30 -0300
commita6b148696d4430656708148787af5b6f738ec9a1 (patch)
tree8eb01544ccca100cf05fc6baf14b40863cfde261 /extension/interactive-bgm.js
parent0afb52b55a45326e3d3298442c54cfd34ee8cbb6 (diff)
Actually switch song as soon as reasonable
Diffstat (limited to 'extension/interactive-bgm.js')
-rw-r--r--extension/interactive-bgm.js8
1 files changed, 3 insertions, 5 deletions
diff --git a/extension/interactive-bgm.js b/extension/interactive-bgm.js
index 78495f5..2bafe54 100644
--- a/extension/interactive-bgm.js
+++ b/extension/interactive-bgm.js
@@ -10,11 +10,9 @@ document.addEventListener('visibilitychange', () => {
     }
 });
 
-window.addEventListener('load', () => {
-    if (!document.hidden) {
-        sendURL();
-    }
-});
+if (!document.hidden) {
+    sendURL();
+}
 
 let isShowingCreateTrack = false;