Adapt to the new rules.

Signed-off-by: XhmikosR <xhmikosr@gmail.com>
This commit is contained in:
XhmikosR
2020-04-10 21:28:54 +03:00
committed by dependabot-preview[bot]
parent 256887b78e
commit ae13014565
22 changed files with 327 additions and 463 deletions

View File

@@ -16,7 +16,7 @@ var interval = 200;
// Function that asks the API for new data
function reloadData() {
clearTimeout(timer);
$.getJSON("scripts/pi-hole/php/tailLog.php?offset=" + offset, function(data) {
$.getJSON("scripts/pi-hole/php/tailLog.php?offset=" + offset, function (data) {
pre.append(data.lines);
if (scrolling && offset !== data.offset) {
@@ -29,9 +29,9 @@ function reloadData() {
timer = setTimeout(reloadData, interval);
}
$(function() {
$(function () {
// Get offset at first loading of page
$.getJSON("scripts/pi-hole/php/tailLog.php", function(data) {
$.getJSON("scripts/pi-hole/php/tailLog.php", function (data) {
offset = data.offset;
});
pre = $("#output");
@@ -39,11 +39,11 @@ $(function() {
reloadData();
});
$("#chk1").click(function() {
$("#chk1").click(function () {
$("#chk2").prop("checked", this.checked);
scrolling = this.checked;
});
$("#chk2").click(function() {
$("#chk2").click(function () {
$("#chk1").prop("checked", this.checked);
scrolling = this.checked;
});