mirror of
https://github.com/pi-hole/web.git
synced 2025-12-24 12:48:29 +00:00
committed by
dependabot-preview[bot]
parent
256887b78e
commit
ae13014565
@@ -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;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user