js mod
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
root
2024-08-13 09:25:03 +02:00
parent cc6899fa91
commit f5241c1ee1

View File

@@ -38,6 +38,16 @@
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.14.6/dist/umd/popper.min.js" integrity="sha384-wHAiFfRlMFy6i5SRaxvfOCifBUQy1xHdJ/yoi7FRNXMRBu5WHdZYu1hA6ZOblgut" crossorigin="anonymous"></script> <script src="https://cdn.jsdelivr.net/npm/popper.js@1.14.6/dist/umd/popper.min.js" integrity="sha384-wHAiFfRlMFy6i5SRaxvfOCifBUQy1xHdJ/yoi7FRNXMRBu5WHdZYu1hA6ZOblgut" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.2.1/dist/js/bootstrap.min.js" integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k" crossorigin="anonymous"></script> <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.2.1/dist/js/bootstrap.min.js" integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k" crossorigin="anonymous"></script>
<script> <script>
$(function() {
function redirectToInstall() {
window.location.href = 'install.html';
}
function redirectToManage() {
window.location.href = 'manage.html';
}
function start_init() { function start_init() {
var url = 'scan.php?op=init'; var url = 'scan.php?op=init';
$.get(url, function(data){ $.get(url, function(data){
@@ -54,6 +64,7 @@ function start_init() {
function check_init() { function check_init() {
var url = 'scan.php?op=check_init'; var url = 'scan.php?op=check_init';
$.get(url, function(data){ $.get(url, function(data){
console.log(data);
if (data=='NEW') { if (data=='NEW') {
$("#previous").html('No previous install has found...'); $("#previous").html('No previous install has found...');
setTimeout(redirectToInstall, 3000); setTimeout(redirectToInstall, 3000);
@@ -71,8 +82,6 @@ function check_init() {
}); });
} }
$(function() {
var url = 'scan.php?op=redis'; var url = 'scan.php?op=redis';
$.get(url, function(data){ $.get(url, function(data){
if (data=='OK') { if (data=='OK') {
@@ -143,13 +152,6 @@ $(function() {
return angle; return angle;
} }
function redirectToInstall() {
window.location.href = 'install.html';
}
function redirectToManage() {
window.location.href = 'manage.html';
}
}); });
</script> </script>
</body> </body>