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
|
||||
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
|
||||
setupVideosIn(document);
|
||||
@ -231,5 +231,5 @@ if (window.addEventListener) window.addEventListener("load", function(e) {
|
||||
});
|
||||
observer.observe(document.body, {childList: true, subtree: true});
|
||||
}
|
||||
}, false);
|
||||
});
|
||||
|
||||
|
@ -31,10 +31,12 @@ function changeSetting(name, value) {
|
||||
}
|
||||
|
||||
// Create settings menu
|
||||
var settingsMenu = document.createElement("span");
|
||||
settingsMenu.className = "settings";
|
||||
settingsMenu.innerHTML = '<span>[WebM Settings]</span>'
|
||||
+ '<div style="display: none; text-align: left; position: absolute; right: 0px; margin-left: -999em; margin-top: -1px; padding-top: 1px;">'
|
||||
var settingsMenu = document.createElement("div");
|
||||
settingsMenu.style.textAlign = "right";
|
||||
settingsMenu.style.background = "inherit";
|
||||
|
||||
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="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>'
|
||||
|
Loading…
Reference in New Issue
Block a user