PlayPhraseMe

From PKC
(Redirected from Playphrase Me)
Jump to navigation Jump to search


<HTML>

Please type in a phrase that you want to see it spoken in a movie:

<input type="text" id="phraseInput" placeholder="Enter phrase">

<button onclick="searchPhrase()">Search</button>

A window will open and videos to be played by PlayPhase.me

<script> searchInput.addEventListener('keyup', (e) => {

 if (e.keyCode === 13) {
   searchPhrase();
 }

});

function searchPhrase() {

 const phrase = document.getElementById('phraseInput').value;
 
 // Remove spaces and replace with +
 const searchTerm = phrase.replace(/\s/g, '+'); 
 const srcPrefix = 'http://playphrase.me/#/search?q='
 // Open new tab with search url
 window.open(srcPrefix + searchTerm); 

} </script> </html>