-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathapp.js
38 lines (33 loc) · 941 Bytes
/
app.js
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
window.addEventListener('load',()=>{
var app = new Vue({
el: '#app',
data: {
url:'',
id:'',
link:'',
},
methods:{
onayla:function(){
if (this.url!="") {
this.id=this.url.substr(this.id.length - 11);
this.link=`https://www.yt-download.org/api/button/mp3/${this.id}`;
}
else{
alert("Empty Error");
}
}
},
})
})
// this.link=`https://www.download-mp3-youtube.com/api/? api_key=NTA4ODk2NDc4&format=mp3&video_id=${this.id}&button_color=0085ef&text_color=444444`;
//https://www.yt-download.org/api/button/mp3/YouTube-Video-ID
/*
var url ="https://www.youtube.com/watch?v=sSab1WFGuXA"
var id = url.substr(id.length - 11);
document.write(id);
var buton = document.getElementById('buton');
function onayla(){
buton.src=
`https://www.download-mp3-youtube.com/api/? api_key=NTA4ODk2NDc4&format=mp3&video_id=${id}`;
}
*/