diff options
| author | Benjamin Southall <applemansigloo@gmail.com> | 2019-08-11 09:35:11 +1000 |
|---|---|---|
| committer | Benjamin Southall <applemansigloo@gmail.com> | 2019-08-11 09:35:11 +1000 |
| commit | 3b72fbf5f17d0df75332c5a018ae2abb7467602b (patch) | |
| tree | a3fd99ddd68b6676a9a45229115da989e5ea4da6 /js | |
| parent | 33b60b860c4cb8655047ee11eda49fc92db1b348 (diff) | |
Fixes Video expanding doesn't work #164, this is probably because the logic always assumed settings menu would have body as parent and with a pagewrap div it doesn't anymore. This now works without options.js enabled
Diffstat (limited to 'js')
| -rw-r--r-- | js/expand-video.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/js/expand-video.js b/js/expand-video.js index 08b474c1..eb26cbed 100644 --- a/js/expand-video.js +++ b/js/expand-video.js @@ -218,8 +218,11 @@ function setupVideosIn(element) { onready(function(){ // Insert menu from settings.js - if (typeof settingsMenu != "undefined" && typeof Options == "undefined") - document.body.insertBefore(settingsMenu, document.getElementsByTagName("hr")[0]); + if (typeof settingsMenu != "undefined" && typeof Options == "undefined") { + var firsthr = document.getElementsByTagName("hr")[0]; + var hrparent = firsthr.parentNode; + hrparent.insertBefore(settingsMenu, firsthr); + } // Setup Javascript events for videos in document now setupVideosIn(document); |
