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

This commit is contained in:
Benjamin Southall 2019-08-11 09:35:11 +10:00
parent 33b60b860c
commit 3b72fbf5f1
1 changed files with 5 additions and 2 deletions

View File

@ -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);