bbs stuff

complementary to noir

  1. // ==UserScript==
  2. // @name bbs stuff
  3. // @version 2.8
  4. // @description complementary to noir
  5. // @author Jerry
  6. // @match *://www.1point3acres.com/*
  7. // @match *://newmitbbs.com/*
  8. // @namespace https://gf.qytechs.cn/en/users/28298
  9. // @homepage https://gf.qytechs.cn/en/scripts/456921
  10. // @license MIT
  11. // ==/UserScript==
  12.  
  13. // original author: Michael Wang https://gf.qytechs.cn/en/scripts/472251-dark-mode/code
  14. // with help of claude ai
  15. // https://theabbie.github.io
  16.  
  17. (function () {
  18. // Create style element for dark mode
  19. const bbsDarkStyle = document.createElement('style');
  20. bbsDarkStyle.textContent = `
  21. html {
  22. filter: invert(1) hue-rotate(180deg) contrast(0.8);
  23. }
  24. /** reverse filter for media elements */
  25. img, video, picture, canvas, iframe, embed {
  26. filter: invert(1) hue-rotate(180deg);
  27. }
  28. `;
  29.  
  30. // Initialize based on system mode
  31. let darkMode = window.matchMedia('(prefers-color-scheme: dark)').matches;
  32. if (darkMode) {
  33. document.head.appendChild(bbsDarkStyle);
  34. } else {
  35. document.head.removeChild(bbsDarkStyle);
  36. }
  37. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址