Back to Repository

InjectJS Dark Theme

0 upvotes
By kalanpdrake@gmail.com
Before page load (document_start)

Description

Override InjectJS Theme To A Pleasant Dark One. (Learned how to CSS Inject from yall I just made the theme for my use and I figured i'd share it.)

Match Pattern

https://www.injectjs.net/*

Script Code

(function() {
  const CSS = `
      button[aria-label="Edit script"] {
		color: #547AA5 !important;
	  }
      button[aria-label="Delete script"] {
		color: #AD343E !important;
	  }
      body,label,p,li {
        color: #C5EBFC !important;
      }
      .MuiTypography-root,.Mui-focused,.MuiInputAdornment-root,.cm-gutterElement,.MuiInputBase-root {
        color: #C5EBFC !important;
      }
      .MuiPaper-root,.MuiBox-root,.MuiContainer-root,.cm-gutters {
        background-color: #2E3532 !important;
      }
      .cm-editor {
        background-color: #2E3532 !important;
        color: #C5EBFC !important;
      }
      .cm-activeLineGutter {
        background-color: #C5EBFC !important;
        color: #2E3532 !important;
      }
      .MuiSwitch-switchBase {
        color: #AD343E !important;
      }
      .Mui-checked,.MuiButton-icon,.MuiButton-colorInherit {
        color: #1976d2 !important;
      }
      .cm-scroller,.MuiDialogContent-root,.MuiPaper-root,.MuiBox-root,.MuiContainer-root {
        scrollbar-color: #C5EBFC #2E3532; 
      }
  `;

  // Inject the base style immediately
  const style = document.createElement('style');
  style.type = 'text/css';
  style.textContent = CSS;
  document.documentElement.appendChild(style);
})();
Install requires the InjectJS Chrome extension. Scripts run only on sites matching the pattern above. Review code before installing any community script.