-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathsupport.js
36 lines (31 loc) · 904 Bytes
/
support.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
function fixEmail() {
var email = String.fromCharCode(210/2 + 1) + '[email protected]';
document.getElementById('emailheader').innerHTML =
'<a href="mailto:' + email + '">' + email + '</a>';
}
function videoPrepare(video) {
var button = video.parentNode.querySelector('a.playbutton');
if(button) {
button.style.display = "";
}
}
function videoFallback(video) {
// replace <video> with its contents
while(video.hasChildNodes()) {
if(video.firstChild instanceof HTMLSourceElement) {
video.removeChild(video.firstChild);
} else {
video.parentNode.insertBefore(video.firstChild, video);
}
}
video.parentNode.removeChild(video);
}
function videoPlay(event) {
var button = event.target;
button.style.display = "none";
var video = button.parentNode.firstElementChild;
video.controls = true;
video.play();
event.preventDefault();
return false;
}