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:
parent
33b60b860c
commit
3b72fbf5f1
|
@ -218,8 +218,11 @@ function setupVideosIn(element) {
|
||||||
|
|
||||||
onready(function(){
|
onready(function(){
|
||||||
// Insert menu from settings.js
|
// Insert menu from settings.js
|
||||||
if (typeof settingsMenu != "undefined" && typeof Options == "undefined")
|
if (typeof settingsMenu != "undefined" && typeof Options == "undefined") {
|
||||||
document.body.insertBefore(settingsMenu, document.getElementsByTagName("hr")[0]);
|
var firsthr = document.getElementsByTagName("hr")[0];
|
||||||
|
var hrparent = firsthr.parentNode;
|
||||||
|
hrparent.insertBefore(settingsMenu, firsthr);
|
||||||
|
}
|
||||||
|
|
||||||
// Setup Javascript events for videos in document now
|
// Setup Javascript events for videos in document now
|
||||||
setupVideosIn(document);
|
setupVideosIn(document);
|
||||||
|
|
Loading…
Reference in New Issue