···1717</head>
18181919<body>
2020- <div id="music">
2020+ <div id="walkman-mp3-player">
2121 <div id="screen">
2222 <!-- top bar info-->
2323 <div id="top-bar">
···6666 </div>
67676868 <!-- credit and resources -->
6969- <p><a href="https://github.com/doqmeat/js-walkman-mp3-player">github repo</a> for info. <a href="https://ko-fi.com/s/df5738006f">ko-fi shop</a> for easy download.</p>
7070- <p>built using sayantanm19's <a href="https://github.com/sayantanm19/js-music-player">js-music-player</a>, <a href="https://www.nerdfonts.com/" target="_blank">nerdfonts</a>, <a href="https://manos.malihu.gr/style-my-tooltips-jquery-plugin/" target="_blank">Style-my-tooltips jQuery plugin</a>.</p>
6969+ <!-- you can remove this -->
7070+ <p><a href="https://github.com/doqmeat/js-walkman-mp3-player">github repo</a> for info. <a href="https://vgen.co/doqmeat/product/js-walkman-mp3-player/6c9efad3-53ae-462e-8b70-5cc67b933a05" target="_blank">vgen shop</a> for easy download.</p>
7171+ <p>built using sayantanm19's <a href="https://github.com/sayantanm19/js-music-player" target="_blank">js-music-player</a>, <a href="https://www.nerdfonts.com/" target="_blank">nerdfonts</a>, <a href="https://manos.malihu.gr/style-my-tooltips-jquery-plugin/" target="_blank">Style-my-tooltips jQuery plugin</a>.</p>
71727273 <script src="main.js"></script>
7374</body>
+6-3
main.js
···11/*
22-using this for the music player: https://github.com/sayantanm19/js-music-player
22+built with https://github.com/sayantanm19/js-music-player
33+edited by doqmeat for js walkman mp3 player
34*/
4556// song info
···212213213214 let currentMinutes = Math.floor(curr_track.currentTime / 60);
214215 let currentSeconds = Math.floor(
215215- curr_track.currentTime - currentMinutes * 60
216216+ curr_track.currentTime - currentMinutes * 60,
216217 );
217218 let durationMinutes = Math.floor(curr_track.duration / 60);
218219 let durationSeconds = Math.floor(
219219- curr_track.duration - durationMinutes * 60
220220+ curr_track.duration - durationMinutes * 60,
220221 );
221222222223 if (currentSeconds < 10) {
···245246 track_list[track_index].artist;
246247 window.open(searchString, "_blank");
247248}
249249+250250+// console.table(track_list[track_index].name);
+18-1
style.css
···11/* mp3 player wrapper. everything is nested in here just to be extra careful and not mess with other elements you might have */
22-#music {
22+#walkman-mp3-player {
33 box-sizing: border-box;
44 position: relative;
55 font-family: arial, nerdfont;
···324324 font-family: "nerdfont";
325325 src: url(files/symbolsnerdfont.ttf);
326326}
327327+328328+/* you can remove these, they are so the whole page looks nicer */
329329+330330+body {
331331+ font-family: ms pgothic;
332332+ background: linear-gradient(
333333+ 204deg,
334334+ rgb(239, 161, 161) 0%,
335335+ rgba(255, 227, 179, 1) 100%
336336+ );
337337+ margin: 50px;
338338+ height: 100vh;
339339+ font-size: 18px;
340340+ a {
341341+ color: rgb(68, 68, 186);
342342+ }
343343+}