CSS: twitter.com

Corrections to UI of twitter.com

当前为 2023-01-19 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name CSS: twitter.com
  3. // @description Corrections to UI of twitter.com
  4. // @author MK
  5. // @namespace max44
  6. // @homepage https://greasyfork.org/en/users/309172-max44
  7. // @match *://*.twitter.com/*
  8. // @icon https://www.google.com/s2/favicons?domain=twitter.com
  9. // @version 1.1.3
  10. // @license MIT
  11. // @run-at document-idle
  12. // ==/UserScript==
  13.  
  14. (function() {
  15. //CSS for any mode
  16. var css = `
  17. /*No opacity for header*/
  18. .r-6026j { /*white UI*/
  19. background-color: rgba(255, 255, 255, 1) !important;
  20. }
  21. .r-ii8lfi { /*dim UI*/
  22. background-color: rgba(21, 32, 43, 1) !important;
  23. }
  24. .r-5zmot { /*lights out UI*/
  25. background-color: rgba(0, 0, 0, 1) !important;
  26. }
  27. .r-1e5uvyk {
  28. backdrop-filter: none !important;
  29. }
  30. /*Add bottom border to header*/
  31. main[role="main"] div[data-testid="primaryColumn"] > div[tabindex="0"] > div, /*Desktop browser*/
  32. div[data-testid="TopNavBar"] { /*Mobile browser*/
  33. border-bottom-width: 1px !important;
  34. border-bottom-style: solid !important;
  35. border-bottom-color: rgb(239, 243, 244) !important;
  36. }
  37. `;
  38.  
  39. if (typeof GM_addStyle != 'undefined') {
  40. GM_addStyle(css);
  41. } else if (typeof PRO_addStyle != 'undefined') {
  42. PRO_addStyle(css);
  43. } else if (typeof addStyle != 'undefined') {
  44. addStyle(css);
  45. } else {
  46. var node = document.createElement('style');
  47. node.type = 'text/css';
  48. node.appendChild(document.createTextNode(css));
  49. document.documentElement.appendChild(node);
  50. }
  51. })();