Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function ConverteLink(){
- var Edit = document.getElementById('edit');
- var Texto = Edit.value;
- if(Texto.substring(0, 32) != 'https://drive.google.com/file/d/'){
- alert('Link Inválido!');
- return;
- }
- var T = 'https://drive.google.com/file/d/';
- var Inicio = T.length;
- var Fim = Texto.indexOf('/view?usp=sharing');
- var ID = Texto.substring(Inicio, Fim);
- var NovoLink = 'https://docs.google.com/uc?export=download&id=' + ID;
- Edit.value = NovoLink;
- alert('Convertido!');
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement