Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use $(fn) #1408

Merged
merged 1 commit into from
May 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/pi-hole/js/auditlog.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ function auditUrl(url) {
add(url, "audit");
}

$(document).ready(function () {
$(function () {
// Pull in data via AJAX
updateTopLists();

Expand Down
2 changes: 1 addition & 1 deletion scripts/pi-hole/js/customdns.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function showAlert(type, message) {
alertElement.delay(8000).fadeOut(2000);
}

$(document).ready(function () {
$(function () {
$("#btnAdd").on("click", addCustomDNS);

table = $("#customDNSTable").DataTable({
Expand Down
2 changes: 1 addition & 1 deletion scripts/pi-hole/js/db_graph.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ function updateQueriesOverTime() {
);
}

$(document).ready(function () {
$(function () {
var ctx = document.getElementById("queryOverTimeChart").getContext("2d");
var blockedColor = "#999";
var permittedColor = "#00a65a";
Expand Down
2 changes: 1 addition & 1 deletion scripts/pi-hole/js/db_queries.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ function refreshTableData() {
tableApi.ajax.url(APIstring).load(reloadCallback);
}

$(document).ready(function () {
$(function () {
var APIstring;

if (instantquery) {
Expand Down
2 changes: 1 addition & 1 deletion scripts/pi-hole/js/footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ function testCookies() {
return ret;
}

$(document).ready(function () {
$(function () {
var enaT = $("#enableTimer");
var target = new Date(parseInt(enaT.html()));
var seconds = Math.round((target.getTime() - new Date().getTime()) / 1000);
Expand Down
2 changes: 1 addition & 1 deletion scripts/pi-hole/js/groups-adlists.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function getGroups() {
);
}

$(document).ready(function () {
$(function () {
$("#btnAdd").on("click", addAdlist);

utils.setBsSelectDefaults();
Expand Down
2 changes: 1 addition & 1 deletion scripts/pi-hole/js/groups-clients.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function getGroups() {
);
}

$(document).ready(function () {
$(function () {
$("#btnAdd").on("click", addClient);

reloadClientSuggestions();
Expand Down
2 changes: 1 addition & 1 deletion scripts/pi-hole/js/groups-domains.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function getGroups() {
);
}

$(document).ready(function () {
$(function () {
window.location.search
.substr(1)
.split("&")
Expand Down
2 changes: 1 addition & 1 deletion scripts/pi-hole/js/groups.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
var table;
var token = $("#token").text();

$(document).ready(function () {
$(function () {
$("#btnAdd").on("click", addGroup);

table = $("#groupsTable").DataTable({
Expand Down
2 changes: 1 addition & 1 deletion scripts/pi-hole/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -775,7 +775,7 @@ function updateSummaryData(runOnce) {
});
}

$(document).ready(function () {
$(function () {
// Pull in data via AJAX
updateSummaryData();

Expand Down
2 changes: 1 addition & 1 deletion scripts/pi-hole/js/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ function renderMessage(data, type, row) {
}
}

$(document).ready(function () {
$(function () {
$("#messagesTable").DataTable({
ajax: {
url: "api_db.php?messages",
Expand Down
2 changes: 1 addition & 1 deletion scripts/pi-hole/js/network.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ function parseColor(input) {
}
}

$(document).ready(function () {
$(function () {
tableApi = $("#network-entries").DataTable({
rowCallback: function (row, data) {
var color,
Expand Down
2 changes: 1 addition & 1 deletion scripts/pi-hole/js/queries.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ function autofilter() {
return $("#autofilter").prop("checked");
}

$(document).ready(function () {
$(function () {
// Do we want to filter queries?
var GETDict = {};
window.location.search
Expand Down
2 changes: 1 addition & 1 deletion scripts/pi-hole/js/queryads.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,6 @@ $(window).on("resize", function () {
.addClass("input-group-btn");
}
});
$(document).ready(function () {
$(function () {
$(window).trigger("resize");
});
6 changes: 3 additions & 3 deletions scripts/pi-hole/js/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ function loadCacheInfo() {
}

var leasetable, staticleasetable;
$(document).ready(function () {
$(function () {
if (document.getElementById("DHCPLeasesTable")) {
leasetable = $("#DHCPLeasesTable").DataTable({
dom: "<'row'<'col-sm-12'tr>><'row'<'col-sm-6'i><'col-sm-6'f>>",
Expand Down Expand Up @@ -225,7 +225,7 @@ $(function () {
});

// DHCP leases tooltips
$(document).ready(function () {
$(function () {
$('[data-toggle="tooltip"]').tooltip({ html: true, container: "body" });
});

Expand All @@ -241,7 +241,7 @@ $(".nav-tabs a").on("shown.bs.tab", function (e) {
});

// Auto dismissal for info notifications
$(document).ready(function () {
$(function () {
var alInfo = $("#alInfo");
if (alInfo.length > 0) {
alInfo.delay(3000).fadeOut(2000, function () {
Expand Down