-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathpreload2.js
More file actions
28 lines (23 loc) · 764 Bytes
/
Copy pathpreload2.js
File metadata and controls
28 lines (23 loc) · 764 Bytes
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
'use strict';
var theNewScript = document.createElement("script");
theNewScript.type = "text/javascript";
theNewScript.src = "http://code.jquery.com/jquery-1.10.2.js";
document.getElementsByTagName("head")[0].appendChild(theNewScript);
// jQuery MAY OR MAY NOT be loaded at this stage
var waitForLoad = function () {
if (typeof jQuery != "undefined") {
$.get("http://google.com");
} else {
window.setTimeout(waitForLoad, 1000);
}
};
window.setTimeout(waitForLoad, 1000);
window.playPause = function () {
document.getElementById('playpausebutton').click()
};
window.previous = function() {
document.getElementById('seekbackbutton').click()
};
window.next = function() {
document.getElementById('seekforwardbutton').click()
};