commit 899f995: [Minor] Remove obsolete code

moisseev moiseev at mezonplus.ru
Tue Nov 14 14:56:04 UTC 2023


Author: moisseev
Date: 2023-11-14 10:58:04 +0300
URL: https://github.com/rspamd/rspamd/commit/899f9957dfed93da4eab658fb06caddfb6136fd6

[Minor] Remove obsolete code
ES6 is required now for WebUI anyway.

---
 interface/js/app/config.js | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/interface/js/app/config.js b/interface/js/app/config.js
index b3f4e5661..71a59a34b 100644
--- a/interface/js/app/config.js
+++ b/interface/js/app/config.js
@@ -159,15 +159,6 @@ define(["jquery", "codejar", "linenumbers", "prism"],
             };
             let mode = "advanced";
 
-            // CodeJar requires ES6
-            if (!window.CodeJar ||
-                // Required to restore cursor position
-                (typeof window.getSelection().setBaseAndExtent !== "function")) {
-                mode = "basic";
-                $("input[name=editorMode][value='basic']").closest(".btn").button("toggle");
-                $("input[name=editorMode][value='advanced']").closest(".btn").addClass("disabled").prop("title", "Not supported by web browser");
-            }
-
             // Modal form for maps
             $(document).on("click", "[data-bs-toggle=\"modal\"]", function () {
                 var checked_server = rspamd.getSelector("selSrv");


More information about the Commits mailing list