theme_feature.js 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. //# SECTION theme
  2. // /**
  3. // * Applies the set theme color
  4. // */
  5. // function applyTheme()
  6. // {
  7. // const formatRegex = /^(\d{3}){1,2}$/;
  8. // const color = features.themeColor.match(formatRegex) ? `#${color}` : color;
  9. // /**
  10. // * A list of changes to be made to the page to apply the theme color
  11. // */
  12. // const themeChanges = [
  13. // {
  14. // elem: document.querySelector("#progressContainer > #primaryProgress"),
  15. // prop: "background",
  16. // important: false,
  17. // },
  18. // {
  19. // elem: document.querySelector(),
  20. // prop: "",
  21. // important: false,
  22. // },
  23. // {
  24. // elem: document.querySelector(),
  25. // prop: "",
  26. // important: false,
  27. // },
  28. // ];
  29. // themeChanges.forEach(change => {
  30. // if(change.elem)
  31. // {
  32. // const value = change.important === true ? `${color} !important` : color;
  33. // change.elem.style[change.prop] = value;
  34. // }
  35. // });
  36. // }