From: Chris Hofstaedtler Date: Tue, 2 Aug 2022 07:00:35 +0000 (+0200) Subject: rec: use defer instead of $(document).ready X-Git-Tag: rec-4.8.0-alpha1~65^2~12 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=782acaaf61e32ca9a1656ffc359c231e2433be7e;p=thirdparty%2Fpdns.git rec: use defer instead of $(document).ready --- diff --git a/pdns/recursordist/html/index.html b/pdns/recursordist/html/index.html index 2624b90fa5..ec81a77418 100644 --- a/pdns/recursordist/html/index.html +++ b/pdns/recursordist/html/index.html @@ -2,18 +2,18 @@ - - - - - + + + + + - + diff --git a/pdns/recursordist/html/local.js b/pdns/recursordist/html/local.js index 48c3989996..90ce90effe 100644 --- a/pdns/recursordist/html/local.js +++ b/pdns/recursordist/html/local.js @@ -23,7 +23,7 @@ function get_json(url, params) { }); } -$(document).ready(function () { +function startup() { var getTemplate = function (name) { var template = $('#' + name + '-template').html(); return Handlebars.compile(template); @@ -231,4 +231,7 @@ $(document).ready(function () { update(); setInterval(update, 1000); -}); +} + +// rely on "defer" on