Sha256: 953602b26d37c9f9afd9ceffb43acbcf5b0e4d551d48e4a67d7c23458f0d2661

Contents?: true

Size: 467 Bytes

Versions: 3

Compression:

Stored size: 467 Bytes

Contents

(function () {
  const theme = window.localStorage.getItem("theme");
  const pickers = document.querySelectorAll("#picker");
  pickers.forEach((picker) => {
    picker.addEventListener("click", clickHandler(picker.dataset.themeClass));
  });
  const root = document.querySelector("html");
  ("#diplayselectedtheme");
  function clickHandler(color) {
    return () => {
      window.localStorage.setItem("theme", color);
      root.className = color;
    };
  }
})();

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
dark-blog-theme-2.1.0 assets/theme-assets/js/theme.js
dark-blog-theme-2.0.1 assets/theme-assets/js/theme.js
dark-blog-theme-2.0.0 assets/theme-assets/js/theme.js