Spaces:
Running
Running
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width" /> | |
<title>My static Space</title> | |
<link rel="stylesheet" href="style.css" /> | |
</head> | |
<body> | |
<div id='cap'> | |
</div> | |
<script> | |
const urlParams = new URLSearchParams(window.location.search); | |
var p_pdf = urlParams.get('pdfurl') | |
var p_mod = urlParams.get('mod') | |
var p_len = urlParams.get('len') | |
var p_nos = urlParams.get('nos') | |
var p_wid = urlParams.get('wid') | |
var p_pau = urlParams.get('pau') | |
if (p_mod) { | |
console.log(p_mod) | |
} else { | |
p_mod = "en_US-joe-medium"; | |
}; | |
if (p_len) { | |
console.log(p_len) | |
} else { | |
p_len = "1"; | |
}; | |
if (p_nos) { | |
console.log(p_nos) | |
} else { | |
p_nos = "0.5"; | |
}; | |
if (p_wid) { | |
console.log(p_wid) | |
} else { | |
p_wid = "0.5"; | |
}; | |
if (p_pau) { | |
console.log(p_pau) | |
} else { | |
p_pau = "1"; | |
}; | |
var framediv = document.getElementById('cap'); | |
let child = framediv.lastElementChild; | |
while (child) { | |
framediv.removeChild(child); | |
child=framediv.lastElementChild; | |
} | |
const iframediv = document.createElement('iframe'); | |
iframediv.src = 'https://broadfield-fast-voice-full.hf.space/?pdfurl=' + p_pdf+'&mod='+p_mod+'&len='+p_len+'&nos='+p_nos+'&wid='+p_wid+'&pau='+p_pau; | |
iframediv.width = '100%'; | |
iframediv.height = '5000px'; | |
iframediv.frameborder="0"; | |
framediv.appendChild(iframediv); | |
</script> | |
</body> | |
</html> | |