-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
54 lines (49 loc) · 1.15 KB
/
index.html
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Juab</title>
<style>
html, body {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
overflow: hidden;
}
webview {
display:inline-flex;
width:100%;
height:100%;
}
webview.hide {
flex: 0 1;
width: 0px;
height: 0px;
}
</style>
</head>
<body>
<webview id="foo" src="http://music.sanook.com/"style="" allowpopups disablewebsecurity> </webview>
</body>
<script>
// You can also require other files to run in this process
require('./renderer.js')
</script>
<script>
const webview = document.getElementById('foo');
onload = () => {
webview.addEventListener('did-stop-loading', function(){
});
};
function MediaPlayPause(){
webview.executeJavaScript("document.getElementById('btnPlay').click();");
}
function MediaNextTrack(){
webview.executeJavaScript("document.getElementById('btnNext').click();");
}
function MediaPreviousTrack(){
webview.executeJavaScript("document.getElementById('btnPrev').click();");
}
</script>
</html>