willtheorangeguy / willtheorangeguy.github.io

Use const declarations for variables that are never reassigned JS-0242
Anti-pattern
Minor
5 months ago2 years old
24        );
25      console.debug("User theming enabled.");
26      let t,
27        n = s();28      switch ((console.debug(`User's theme variation: ${n}`), n)) {
29        case 0:
30          t = !1;
1094                    document.activeElement !== document.documentElement &&
1095                    document.activeElement) ||
1096                  null,
1097                n =1098                  t instanceof HTMLInputElement ||
1099                  t instanceof HTMLTextAreaElement;
1100              p && !n && (e.preventDefault(), u());
1088              e.classList.contains("searching") && u();
1089            }
1090            if (e.key === "/") {
1091              let t =1092                  (document.hasFocus() &&
1093                    document.activeElement !== document.body &&
1094                    document.activeElement !== document.documentElement &&
1080            window.getSelection().removeRange(e);
1081          }),
1082          H();
1083        let e = ".js-github-release";1084        $(e).length > 0 && I(e, $(e).data("repo")),
1085          document.addEventListener("keyup", (e) => {
1086            if (e.code === "Escape") {
1070          $(".js-copy-cite").click(function (t) {
1071            t.preventDefault();
1072            let e = document.createRange(),
1073              n = document.querySelector("#modal .modal-body");1074            e.selectNode(n), window.getSelection().addRange(e);
1075            try {
1076              document.execCommand("copy");