Skip to content

Commit

Permalink
Added talking speed to url when copying itinerarium#19
Browse files Browse the repository at this point in the history
  • Loading branch information
Kalekdan committed Jan 4, 2020
1 parent 8496c0c commit 4448877
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,10 @@ <h1>phoneme synthesis</h1>

function copy_link_button() {
uipa = document.getElementById("ipa-input").value;
url = window.location.href.split('?')[0] + "?w=" + uipa;
playbackSpeed = document.getElementById("playback-speed-input").value;

url = window.location.href.split('?')[0] + "?w=" + uipa + "&s=" + playbackSpeed;

copyToClipboard(url);
}

Expand Down Expand Up @@ -327,10 +330,16 @@ <h2>note</h2>
(function() {
var urlParams = new URLSearchParams(window.location.search);
if(urlParams.has('w')) {
var word = urlParams.get('w');
if(is_valid_input(word)) {
var word = urlParams.get('w');
if(is_valid_input(word)) {
document.getElementById("ipa-input").value = word;
}
}
}
if(urlParams.has('s')) {
var word = urlParams.get('s');
if(is_valid_input(word)) {
document.getElementById("playback-speed-input").value = word;
}
}
})();
</script>
Expand Down

0 comments on commit 4448877

Please sign in to comment.