]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
daf: fix the rule builder form
authorJiří Helebrant <jiri.helebrant@nic.cz>
Tue, 31 Mar 2020 09:40:47 +0000 (11:40 +0200)
committerTomas Krizek <tomas.krizek@nic.cz>
Thu, 2 Apr 2020 11:57:31 +0000 (13:57 +0200)
modules/daf/daf.js

index 6124d5b83bea3230e2be36113ce8923255756394..d8288192f57f2235c993e09618c6ac2e37f8a9b3 100644 (file)
@@ -172,7 +172,7 @@ function loadTable(resp) {
        }
 }
 
-$(function() {
+document.addEventListener("DOMContentLoaded", () => {
        /* Load the filter table. */
        $.ajax({
                url: 'daf',
@@ -181,6 +181,7 @@ $(function() {
                success: loadTable
        });
        /* Listen for counter updates */
+       const secure = window.location.protocol == "https";
        const wsStats = (secure ? 'wss://' : 'ws://') + location.host + '/daf';
        const ws = new Socket(wsStats);
        var lastRateUpdate = Date.now();