webm: more integration
This commit is contained in:
parent
ccc822d8ab
commit
5c38368e60
@ -208,9 +208,9 @@ function setupVideosIn(element) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (window.addEventListener) window.addEventListener("load", function(e) {
|
onready(function(){
|
||||||
// Insert menu from settings.js
|
// Insert menu from settings.js
|
||||||
if (typeof settingsMenu != "undefined") document.body.insertBefore(settingsMenu, document.body.firstChild);
|
if (typeof settingsMenu != "undefined") document.body.insertBefore(settingsMenu, document.getElementsByTagName("hr")[0]);
|
||||||
|
|
||||||
// Setup Javascript events for videos in document now
|
// Setup Javascript events for videos in document now
|
||||||
setupVideosIn(document);
|
setupVideosIn(document);
|
||||||
@ -231,5 +231,5 @@ if (window.addEventListener) window.addEventListener("load", function(e) {
|
|||||||
});
|
});
|
||||||
observer.observe(document.body, {childList: true, subtree: true});
|
observer.observe(document.body, {childList: true, subtree: true});
|
||||||
}
|
}
|
||||||
}, false);
|
});
|
||||||
|
|
||||||
|
@ -31,10 +31,12 @@ function changeSetting(name, value) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create settings menu
|
// Create settings menu
|
||||||
var settingsMenu = document.createElement("span");
|
var settingsMenu = document.createElement("div");
|
||||||
settingsMenu.className = "settings";
|
settingsMenu.style.textAlign = "right";
|
||||||
settingsMenu.innerHTML = '<span>[WebM Settings]</span>'
|
settingsMenu.style.background = "inherit";
|
||||||
+ '<div style="display: none; text-align: left; position: absolute; right: 0px; margin-left: -999em; margin-top: -1px; padding-top: 1px;">'
|
|
||||||
|
settingsMenu.innerHTML = '<a class="unimportant" href="javascript:void(0)"><span>WebM Settings</span></a>'
|
||||||
|
+ '<div style="display: none; text-align: left; position: absolute; right: 1em; margin-left: -999em; margin-top: -1px; padding-top: 1px; background: inherit;">'
|
||||||
+ '<label><input type="checkbox" name="videoexpand">Expand videos inline</label><br>'
|
+ '<label><input type="checkbox" name="videoexpand">Expand videos inline</label><br>'
|
||||||
+ '<label><input type="checkbox" name="videohover">Play videos on hover</label><br>'
|
+ '<label><input type="checkbox" name="videohover">Play videos on hover</label><br>'
|
||||||
+ '<label><input type="range" name="videovolume" min="0" max="1" step="0.01" style="width: 4em; height: 1ex; vertical-align: middle; margin: 0px;">Default volume</label><br>'
|
+ '<label><input type="range" name="videovolume" min="0" max="1" step="0.01" style="width: 4em; height: 1ex; vertical-align: middle; margin: 0px;">Default volume</label><br>'
|
||||||
|
Loading…
Reference in New Issue
Block a user