-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
205 lines (191 loc) · 6.64 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
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
<!DOCTYPE html>
<html>
<head>
<title>Spotify Playlist Scrobbler</title>
<!--Core metas-->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<!--Information metas-->
<meta name="description" content="Scrobble all the songs from a Spotify playlist to your lastfm account (with timestamps!)">
<meta name="author" content="Elijah Olmos">
<meta name="theme-color" content="#00D368">
<!--OpenGraph metas-->
<meta property="og:title" content="Spotify Playlist Scrobbler">
<meta property="og:description" content="Scrobble all the songs from a Spotify playlist to your lastfm account (with timestamps!)">
<meta property="og:url" content="http://www.glassintel.com/elijah/programs/spotifyplaylistscrobbler">
<script src="https://code.jquery.com/jquery-3.5.1.min.js" crossorigin="anonymous"></script>
<script src="https://www.gstatic.com/firebasejs/8.4.3/firebase-app.js" defer></script>
<script src="https://www.gstatic.com/firebasejs/8.4.3/firebase-database.js" defer></script>
<!--MD5 hashing tool used for retrieving Lastfm auth creds-->
<script src="js/md5.js" defer></script>
<!--HackTimer allows the setInterval to run at rates quick than 1Hz when the tab is out of focus-->
<script src="../spotify-util/js/HackTimer.js" defer></script>
<script src="../spotify-util/js/progressbar.min.js" defer></script>
<script src="js/app.js" type="module" defer></script>
<!--
<script type='text/javascript' src="http://cdnjs.cloudflare.com/ajax/libs/handlebars.js/2.0.0-alpha.1/handlebars.min.js"></script>
-->
<link rel="stylesheet" type="text/css" href="https://d2c87l0yth4zbw.cloudfront.net/css/80278a9.css">
<link rel="stylesheet" type="text/css" href="../spotify-util/css/checkbox.css">
<style type='text/css'>
.hidden {
display: none !important;
}
.parent {
text-align: center;
}
h1 {
text-align: center;
color:rgb(231, 231, 226);
font-size: 40px;
padding:5px;
}
body {
background:#000;
height: 97vh;
width: 99%;
position: absolute;
top: 0;
}
p, label {
color:rgb(231, 231, 226);
font-family: sans-serif;
text-align: center;
font-size: 20px;
margin: 15px;
}
button {
width:auto;
padding:5px;
font-size: 16px;
}
.flex-item {
display: flex;
flex-flow: column;
}
#retrieve-button {
margin-top:15px;
}
#instructions {
width:75%;
margin:auto;
}
#progress-bar-wrapper {
margin-top:40px;
}
#progress-bar {
border: 2px solid rgb(236, 227, 214);
border-radius: 3px;
width:80%;
margin: auto; /*to center the progressbar*/
}
#playlist-url {
width:450px;
padding:5px;
margin-top:10px;
margin-bottom:10px;
margin-left: 5px; /*space between label and input box*/
font-size: 18px;
text-align: center;
background-color: rgb(236, 227, 214);
}
.playlist-info-wrapper {
display: flex;
align-items: center;
justify-content: center;
}
.playlist-info-wrapper img {
width: 50px;
}
#track-confirmation {
display: grid;
place-items: center;
grid-template-columns: repeat(4, 1fr);
}
@media(max-width:540px){
#track-confirmation {
grid-template-columns: repeat(1, 1fr);
}
}
.track-wrapper {
margin: 15px;
}
.track {
width: 200px;
text-align: center;
position: relative;
padding: 0 40px;
border: 2px solid white;
min-height: 93px;
}
.track img {
width: 75px;
position: absolute;
left: 10px;
top: 9px;
}
.track p {
font-size: 18px;
position: relative;
left: 37px;
}
.status {
position: relative;
width: 279px;
display: inline-block;
font-family: sans-serif;
font-size: 16px;
padding: 2px;
}
.success {
background-color: rgb(74, 255, 85);
}
.error {
background-color: rgb(255, 97, 48);
}
.error:hover {
cursor: pointer;
}
</style>
</head>
<body>
<h1>Spotify Playlist Scrobbler</h1>
<div class="container">
<div id="spotify-login-page" class="parent">
<button id="spotify-login-button">Login with Spotify</button>
</div>
<div id="lastfm-login-page" class="parent hidden">
<button id="lastfm-login-button">Login with Last.fm</button>
</div>
<div id="main-page" class="parent hidden">
<p id="instructions">
This program pulls all the songs from each of your playlist and puts them into a single, gigantic playlist.
<br>
There are a variety of options for you to adjust, allowing the playlist to be customized to your liking. It is recommended you make any playlists you would like to be excluded private before starting the program. All local files are currently ignored due to Spotify's limitations.
</p>
<br>
<div id="input-wrapper">
<div class="playlist-input-wrapper">
<input id="playlist-url" type="text" placeholder="https://open.spotify.com/playlist/2kSJI65wkSaVx8jocKXlTL">
<br>
<div class="playlist-info-wrapper">
<img src="./img/loading.gif">
<p>Enter a Spotify playlist URL</p>
</div>
</div>
</div>
<br>
<div id="button-wrapper">
<button id="combine-button">Scrobble Playlist!</button>
</div>
<div id="progress-bar-wrapper" class="hidden">
<div id="progress-bar"></div>
<div id="estimated-time-remaining"><p></p></div>
</div>
<div id="track-confirmation">
</div>
</div>
</div>
</body>
</html>