-
Notifications
You must be signed in to change notification settings - Fork 1
/
webview.html
111 lines (106 loc) · 4.27 KB
/
webview.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<html>
<head>
<style>
body {
margin: 0px;
background: #262626;
background-attachment: fixed;
background-position: center;
background-size: cover;
background-repeat: no-repeat;
}
webview {
display: inline-flex;
width: 100%;
height: 100%;
min-width: 100%;
min-height: 100%;
}
webview.hide {
visibility: hidden;
}
.overlay{
position: fixed;
cursor: wait;
top: 0;
left: 0;
height: 100%;
width: 100%;
min-width: 100%;
min-height: 100%;
background: url(assets/img/SVG/puff.svg);
background-position: center;
background-repeat: no-repeat;
background-size: auro;
background-color: rgba(0,0,0,0.75);
z-index: 1;
}
nav {
position: fixed;
width: 100%;
height: 40px;
padding: 0 15px;
margin: 0;
background: #151515;
padding: 5px;
text-align: center;
z-index: 5;
}
nav a {
line-height: 25px;
font-size: 25px;
background: #151515;
color: #f0f0f0;
font-family: Arial;
text-decoration: none;
}
nav a img {
width: 25px;
height: 25px;
margin: 3px 5px;
padding: 2px;
border-radius: 50%;
border: 2px solid #fff;
}
</style>
</head>
<body style="background-image: url(https://source.unsplash.com/daily?music/1920x1080);">
<nav>
<a href="https://www.google.com/"><img src="assets/img/google.png"/></a>
<a href="https://app.plex.tv/desktop"><img src="assets/img/plex.png"/></a>
<a href="https://www.last.fm/"><img src="assets/img/lastfm.png"/></a>
<a href="https://www.youtube.com/"><img src="assets/img/youtube.png"/></a>
<a href="https://www.music.youtube.com/"><img src="assets/img/youtubemusic.png"/></a>
<a href="https://play.google.com/music/listen?authuser"><img src="assets/img/googlemusic.png"/></a>
<a href="https://www.spotify.com/"><img src="assets/img/spotify.png"/></a>
<a href="https://tidal.com/"><img src="assets/img/tidal.png"/></a>
<a href="https://www.pandora.com/"><img src="assets/img/pandora.png"/></a>
<a href="ttps://soundcloud.com/stream"><img src="assets/img/soundcloud.png"/></a>
<a href="https://itunes.apple.com/us/artist/player/6241828"><img src="assets/img/applemusic.png"/></a>
<a href="https://music.amazon.com/"><img src="assets/img/amazonprime.png"/></a>
</nav>
<webview id="website" src="" partition="persist:roon" autosize nodeintegration plugins></webview>
<span class="overlay"></span>
<script>
onload = () => {
const webview = document.querySelector('webview');
const overlay = document.querySelector('.overlay');
document.querySelector("a").addEventListener('click', function(event){
event.preventDefault();
document.getElementById('website').src = this.getAttribute("href");
});
webview.addEventListener('dom-ready', () => {
overlay.style.zIndex = -1000;
});
const loadstart = () => {
overlay.style.zIndex = 1000;
};
const loadstop = () => {
overlay.style.zIndex = -1000;
};
webview.addEventListener('did-start-loading', loadstart)
webview.addEventListener('did-stop-loading', loadstop)
}
</script>
</body>
</html>