Skip to content

Commit

Permalink
Supports Download with Original Songname
Browse files Browse the repository at this point in the history
  • Loading branch information
tuhinpal committed Sep 17, 2020
1 parent d8af826 commit 7576fda
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 63 deletions.
111 changes: 54 additions & 57 deletions css/download.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,87 +4,84 @@
*/

.heading {
color: #00ad5f;
font-family: Krona One;
font-size: 25px;
font-weight: bold;
text-align: center;
padding: 12px 20px;
transform: translate(0px, 25px);
color: #00ad5f;
font-family: Krona One;
font-size: 25px;
font-weight: bold;
text-align: center;
padding: 12px 20px;
transform: translate(0px, 25px);
}

.logodiv {
margin-left: auto;
margin-right: auto;
margin-top: 450px;
width: 150px;
height: 50px;
background: #ffffff;
border-radius: 0px;
margin-left: auto;
margin-right: auto;
margin-top: 450px;
width: 150px;
height: 50px;
background: #ffffff;
border-radius: 0px;
}

.logo {
color: #00ad5f;
font-family: 'Bitter', serif;
font-size: 22px;
font-weight: bold;
text-align: center;
transform: translate(0px, 12px);
color: #00ad5f;
font-family: 'Bitter', serif;
font-size: 22px;
font-weight: bold;
text-align: center;
transform: translate(0px, 12px);
}

.quality {
color: #00ad5f;
font-family: Krona One;
font-size: 12px;
text-align: center;
padding: 12px 20px;
color: #00ad5f;
font-family: Krona One;
font-size: 12px;
text-align: center;
padding: 12px 20px;
}

.center {
text-align: center;
display: block;
margin-left: auto;
margin-right: auto;
text-align: center;
display: block;
margin-left: auto;
margin-right: auto;
}

.activityb {
box-shadow: 0px 5px 14px -7px #276873;
background: linear-gradient(to bottom, #00ad5f 5%, #196470 100%);
background-color: #00ad5f;
border-radius: 10px;
display: inline-block;
margin-left: auto;
margin-right: auto;
cursor: pointer;
font-size: 15px;
font-weight: bold;
padding: 13px 15px;
text-shadow: 0px 1px 0px #67818a;
box-shadow: 0px 5px 14px -7px #276873;
background: linear-gradient(to bottom, #00ad5f 5%, #196470 100%);
background-color: #00ad5f;
border-radius: 10px;
display: inline-block;
margin-left: auto;
margin-right: auto;
cursor: pointer;
font-size: 15px;
font-weight: bold;
padding: 13px 15px;
color: #ffffff;
font-family: Krona One;
text-decoration: none;
text-shadow: 0px 1px 0px #67818a;
}

.activityb:hover {
background: linear-gradient(to bottom, #196470 5%, #00ad5f 100%);
background-color: #196470;
background: linear-gradient(to bottom, #196470 5%, #00ad5f 100%);
background-color: #196470;
}

.activityb:active {
position: relative;
top: 0px;
}

.textdld {
color: #ffffff;
font-family: Krona One;
text-decoration: none;
position: relative;
top: 0px;
}

.loading {
position: absolute;
margin: auto;
top: 0;
left: 0;
right: 0;
bottom: 0;
position: absolute;
margin: auto;
top: 0;
left: 0;
right: 0;
bottom: 0;
}


Expand Down
6 changes: 3 additions & 3 deletions download/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ <h1 class="heading" id="songname"></h1>
Please select your preferred quality
</p>
<p class="center">
<a class="activityb" id="qone"></a>
<a class="activityb" id="qone">96 Kbps</a>
<br> <br>
<a class="activityb" id="qtwo"></a>
<a class="activityb" id="qtwo">128 Kbps</a>
<br> <br>
<a class="activityb" id="qthree"></a>
<a class="activityb" id="qthree">320 Kbps</a>
</p>
<div class="logodiv">
<h1 onclick="window.location.href='https://musicder.tk/';" class="logo">MUSICDER</h1>
Expand Down
18 changes: 15 additions & 3 deletions js/download.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,23 @@ xmlhttp.onreadystatechange = function () {
var link = linkr.replace("https://", "/");
document.title = "Download " + songname;
document.getElementById("songname").innerHTML = "Download " + songname;
document.getElementById("qone").innerHTML = "<a href='" + link + "' class='textdld' target='_self' download='" + songname + ".mp3'>96 Kbps</a>"

//96 kbps
document.getElementById("qone").href = link;
document.getElementById("qone").target = "_self";
document.getElementById("qone").download = songname + ".mp3";

//128 kbps
var linkosz = link.replace("_96", "_160");
document.getElementById("qtwo").innerHTML = "<a href='" + linkosz + "' class='textdld' target='_self' download='" + songname + ".mp3'>128 Kbps</a>"
document.getElementById("qtwo").href = linkosz;
document.getElementById("qtwo").target = "_self";
document.getElementById("qtwo").download = songname + ".mp3";

//320 kbps
var linkttz = link.replace("_96", "_320");
document.getElementById("qthree").innerHTML = "<a href='" + linkttz + "' class='textdld' target='_self' download='" + songname + ".mp3'>320 Kbps</a>"
document.getElementById("qthree").href = linkttz;
document.getElementById("qthree").target = "_self";
document.getElementById("qthree").download = songname + ".mp3";
}
};
xmlhttp.open("GET", "https://dldapi.musicder.tk/?pids=" + id, true);
Expand Down

0 comments on commit 7576fda

Please sign in to comment.