From c088e9d9d8296fe154763da3b5297bf85c3cc3a1 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 18 Feb 2021 22:23:06 +0300 Subject: get rid of a few more prototype-isms --- js/utility.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'js/utility.js') diff --git a/js/utility.js b/js/utility.js index a7530a97f..43ad5644e 100644 --- a/js/utility.js +++ b/js/utility.js @@ -16,10 +16,10 @@ window.addEventListener("load", function() { setup_night_mode: function() { const mql = window.matchMedia('(prefers-color-scheme: dark)'); - const link = new Element("link", { - rel: "stylesheet", - id: "theme_auto_css" - }); + const link = document.createElement("link"); + + link.rel = "stylesheet"; + link.id = "theme_auto_css"; link.onload = function() { document.querySelector("body").removeClassName("css_loading"); -- cgit v1.2.3