From 3b72fbf5f17d0df75332c5a018ae2abb7467602b Mon Sep 17 00:00:00 2001 From: Benjamin Southall Date: Sun, 11 Aug 2019 09:35:11 +1000 Subject: [PATCH] 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 --- js/expand-video.js | 7 +++++-- 1 file 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);