getVideo/index.html
<!DOCTYPE html>
<html lang="en">
<head>
<title>Get Video</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<link rel="stylesheet" type="text/css" href="semantic/semantic.min.css">
<link rel="stylesheet" type="text/css" href="getvideo.css">
<link rel="shortcut icon" href="favicon.ico" />
<script
src="semantic/jquery-3.1.1.min.js"
integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8="
crossorigin="anonymous"></script>
<script src="semantic/jquery-3.1.1.min.js"></script>
<script>
function run()
{
var url=$("#txtCmd").val();
pywebview.api.download(url);
}
function kill()
{
pywebview.api.killDownload();
}
$(document).ready(function(){
$("#btnKill").click(function(){
kill();
});
$("#btnCmd").click(function(){
$("#out").html("");
run();
});
});
$(document).keypress(function(e) {
if ( e.which == 13 ) {
e.preventDefault();
run();
}});
</script>
</head>
<body>
<div class="ui container" style="margin-top: 20px">
<h2>Scarica un video dal web!</h2>
<p>Il programma scarica i video di molti siti web. Inserisci url e clicca "scarica"</p>
<div class="ui labeled input">
<div class="ui label">Inserisci url:</div>
<input id="txtCmd" type="text" style="width: 400px" placeholder="collegamento del video" value="">
</div>
<button id="btnCmd" class="ui secondary button" >Scarica</button>
<button id="btnKill" class="ui secondary button" disabled="true">annulla</button>
<div class="ui small image"><img id="loading" class="hidden ui image" src="loading.gif" style="height:30px"></div>
<div>
</div>
<div class="ui message">
<div class="header">Stato scaricamento: </div>
<samp id="out">Pronto allo scaricamento.</samp>
</div>
<div>
<a style="font-size: 10px;margin-right: 25px" href="javascript:pywebview.api.updateYoutubeDl()" >Aggiorna Youtube-dl</a>
<a style="font-size: 10px;margin-right: 25px" href="javascript:pywebview.api.removeYoutubeDl()" >Elimina Youtube-dl</a>
</div>
</div>
</body>
</html>