Browse Source

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

pull/40/head
Benjamin Southall 5 years ago
parent
commit
3b72fbf5f1
  1. 7
      js/expand-video.js

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

Loading…
Cancel
Save