summaryrefslogtreecommitdiff
path: root/expandvideo.js
diff options
context:
space:
mode:
authorccd0 <admin@containerchan.org>2013-11-10 01:56:45 -0800
committerccd0 <admin@containerchan.org>2013-11-10 01:56:45 -0800
commit2a770f27d1a35e8dc7914f9d230e541a93f38d9b (patch)
tree85d409e998904b77d01d6f1c571080462e961fab /expandvideo.js
parent81dbba64e2c34b15186f30fbd76cf1cbd44038bc (diff)
CSS for player.php, make JS more modular
Diffstat (limited to 'expandvideo.js')
-rw-r--r--expandvideo.js9
1 files changed, 2 insertions, 7 deletions
diff --git a/expandvideo.js b/expandvideo.js
index 8d6124b3..26979bea 100644
--- a/expandvideo.js
+++ b/expandvideo.js
@@ -106,12 +106,7 @@ function setupVideo(thumb, url) {
thumb.onmouseout = unhover;
}
-window.onload = function() {
- settingsPanel.style.position = "absolute";
- settingsPanel.style.top = "1em";
- settingsPanel.style.right = "1em";
- document.body.insertBefore(settingsPanel, document.body.firstChild);
-
+if (window.addEventListener) window.addEventListener("load", function(e) {
var thumbs = document.querySelectorAll("a.file");
for (var i = 0; i < thumbs.length; i++) {
if (/\.webm$/.test(thumbs[i].pathname)) {
@@ -124,4 +119,4 @@ window.onload = function() {
}
}
}
-};
+}, false);