From 955ac23149659d3e51ed9246bddd4e7eb04aba9b Mon Sep 17 00:00:00 2001
From: Patrick Marsceill <patrick.marsceill@gmail.com>
Date: Fri, 24 Apr 2020 15:41:13 -0400
Subject: [PATCH] Rm preview js

---
 assets/js/dark-mode-preview.js | 25 -------------------------
 1 file changed, 25 deletions(-)
 delete mode 100644 assets/js/dark-mode-preview.js

diff --git a/assets/js/dark-mode-preview.js b/assets/js/dark-mode-preview.js
deleted file mode 100644
index bb3169f4..00000000
--- a/assets/js/dark-mode-preview.js
+++ /dev/null
@@ -1,25 +0,0 @@
-document.addEventListener("DOMContentLoaded", function () {
-  const toggleDarkMode = document.querySelector(".js-toggle-dark-mode")
-  const cssFile = document.querySelector('[rel="stylesheet"]')
-  const originalCssRef = cssFile.getAttribute("href")
-  const darkModeCssRef = originalCssRef.replace(
-    "just-the-docs.css",
-    "dark-mode-preview.css"
-  )
-  const buttonCopy = ["Return to the light side", "Preview dark color scheme"]
-  const updateButtonText = function (toggleDarkMode) {
-    toggleDarkMode.textContent === buttonCopy[0]
-      ? (toggleDarkMode.textContent = buttonCopy[1])
-      : (toggleDarkMode.textContent = buttonCopy[0])
-  }
-
-  jtd.addEvent(toggleDarkMode, "click", function () {
-    if (cssFile.getAttribute("href") === originalCssRef) {
-      cssFile.setAttribute("href", darkModeCssRef)
-      updateButtonText(toggleDarkMode)
-    } else {
-      cssFile.setAttribute("href", originalCssRef)
-      updateButtonText(toggleDarkMode)
-    }
-  })
-})
-- 
GitLab