Remove js

This commit is contained in:
Laura Hausmann 2019-08-12 20:25:32 +02:00
parent 928dec02e4
commit e613105514
No known key found for this signature in database
GPG Key ID: 1720DF2EC8974C2D
1 changed files with 0 additions and 21 deletions

View File

@ -134,25 +134,4 @@ function formatTime(secs) {
const minutes = Math.floor(secs / 60) || 0; const minutes = Math.floor(secs / 60) || 0;
const seconds = (secs - minutes * 60) || 0; const seconds = (secs - minutes * 60) || 0;
return minutes + ':' + (seconds < 10 ? '0' : '') + seconds; 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)
} }