Skip to content

minamhere/spanishtools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 

Repository files navigation

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>

Enter spanish text:

Listen and Download MP3

<script> function speakSpanish() { var val = $('#spanishPhrase').val(); if (val) location="https://audio1.spanishdict.com/audio?detect_lang=true&text="+val.replace(/\s+/g, '-').toLowerCase()+"&format=mp3"; } $('#spanishPhrase').on('keypress', function (e) { if(e.which === 13){ //Disable textbox to prevent multiple submit $(this).attr("disabled", "disabled"); //Do Stuff, submit, etc.. //$("downloadLink").trigger("click"); window.open("https://audio1.spanishdict.com/audio?detect_lang=true&text="+$('#spanishPhrase').val().replace(/\s+/g, '-').toLowerCase()+"&format=mp3", "_blank"); //Enable the textbox again if needed. $(this).removeAttr("disabled"); } }); $('#spanishPhrase').on('input',function(e){ $("#downloadLink").attr("href", "https://audio1.spanishdict.com/audio?detect_lang=true&text="+$('#spanishPhrase').val().replace(/\s+/g, '-').toLowerCase()+"&format=mp3"); }); </script>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published