Dark(ish) mode for cpanel

currently there is no dark theme but I was messing around with tampermonkey browser plugin and this little bit of script will make it dark(ish) until an official option by admin is available. its just a luminance inverter so things look a bit odd

// ==UserScript==
// @name			infinity free cpanel invert colors
// @description
// @version		    1
// @grant			none
// @match			*://cpanel.infinityfree.com/*
// @grant			none
// ==/UserScript==
(function () {
  const style = "html { filter: invert(1) hue-rotate(180deg) }{-webkit-filter: invert(100%); -moz-filter: invert(100%); -o-filter: invert(100%); -ms-filter: invert(100%); }";
  const head = document.getElementsByTagName("head")[0];
  const styleTag = document.createElement("style");
  styleTag.type = "text/css";
  if (styleTag.styleSheet) {
    styleTag.styleSheet.cssText = style;
  } else {
    styleTag.appendChild(document.createTextNode(style));
  }
  head.appendChild(styleTag);
}());

3 Likes

Looks cool

1 Like

was a quick hack and im sure someone could improve it a lot

4 Likes

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.