Remove js
This commit is contained in:
parent
928dec02e4
commit
e613105514
21
webmusic.js
21
webmusic.js
|
@ -134,25 +134,4 @@ function formatTime(secs) {
|
|||
const minutes = Math.floor(secs / 60) || 0;
|
||||
const seconds = (secs - minutes * 60) || 0;
|
||||
return minutes + ':' + (seconds < 10 ? '0' : '') + seconds;
|
||||
}
|
||||
|
||||
function download(filename, text) {
|
||||
var element = document.createElement('a');
|
||||
element.setAttribute('href', 'data:audio/m3u;charset=utf-8,' + encodeURIComponent(text));
|
||||
element.setAttribute('download', filename);
|
||||
|
||||
element.style.display = 'none';
|
||||
document.body.appendChild(element);
|
||||
|
||||
element.click();
|
||||
|
||||
document.body.removeChild(element);
|
||||
}
|
||||
|
||||
function downloadm3u() {
|
||||
let m3utext = "";
|
||||
queue.forEach(function(item, index){
|
||||
m3utext+=window.location.protocol + "//" + window.location.host + "/" + item + "\n";
|
||||
});
|
||||
download("play.m3u", m3utext)
|
||||
}
|
Loading…
Reference in a new issue