yWeb/Y_Tools_Screenshot: drop prototype.js; use jquery

Origin commit data
------------------
Branch: ni/coolstream
Commit: aaef51bb8a
Author: vanhofen <vanhofen@gmx.de>
Date: 2023-02-02 (Thu, 02 Feb 2023)

Origin message was:
------------------
- yWeb/Y_Tools_Screenshot: drop prototype.js; use jquery

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2023-02-02 21:55:19 +01:00
parent 1a5e324f02
commit caec54eb9d
4 changed files with 67 additions and 73 deletions

View File

@@ -1,16 +1,17 @@
{=include-block:Y_Blocks.txt;head_ni=}
{=include-block:Y_Blocks.txt;head=}
{=include-block:Y_Blocks.txt;jQuery=}
<script type="text/javascript">
//<![CDATA[
var interval;
function do_showshot() {
$('shot').src = "/tmp/lcd4linux.png?"+Math.random();
$('shot').show();
jQuery('#shot').attr("src", "/tmp/lcd4linux.png?" + Math.random());
jQuery('#shot').show();
}
function do_reload(){
if (document.getElementById("checkReload").checked)
interval = setInterval(do_showshot, document.getElementById("inputReload").value + "000");
if (id('checkReload').checked)
interval = setInterval(do_showshot, id('inputReload').value + "000");
else
clearInterval(interval);
}
@@ -40,13 +41,13 @@ function do_reload(){
</div>
</div>
<script>
document.getElementById('checkReload').onclick = function() {
id('checkReload').onclick = function() {
if (this.checked ) {
interval = setInterval(do_showshot, document.getElementById("inputReload").value + "000");
document.getElementById("inputReload").disabled = false;
interval = setInterval(do_showshot, id('inputReload').value + "000");
id('inputReload').disabled = false;
} else {
clearInterval(interval);
document.getElementById("inputReload").disabled = true;
id('inputReload').disabled = true;
}
};
</script>