抖音网页版美化

美化抖音网页版界面

  1. // ==UserScript==
  2. // @name 抖音网页版美化
  3. // @namespace https://suca.cc/
  4. // @version 1.2.1
  5. // @description 美化抖音网页版界面
  6. // @author SueCha
  7. // @match https://www.douyin.com/*
  8. // @icon https://suca.cc/images/alarm.jpg
  9. // @license Apache
  10. // @run-at document-end
  11. // ==/UserScript==
  12.  
  13. (function () {
  14. 'use strict';
  15. //A
  16. // 定义样式内容
  17. const styleContent = `
  18. @media (max-width: 5000px) {
  19. .byAYwK4P {
  20. padding-left: var(--swiper-container-padding-left) !important;
  21. padding-right: 0 ! important;
  22. }
  23. .byAYwK4P.XndxUXHg {
  24. padding-left: 0 ! important;
  25. }
  26. .jLGIrBFY{
  27. display:none ! important;
  28. }
  29. .rtWYegYy{
  30. display:none ! important;
  31. }
  32. .hrk7KiGM {
  33. z-index: 11;
  34. border: 0;
  35. transition: all .3s;
  36. position: absolute;
  37. top: 20%;
  38. right: 0;
  39. transform: translateY(-50%)
  40. }
  41. .dYcWlUlB {
  42. position: relative;
  43. display: none ! important;
  44. }
  45. .L76SgT5E:not(.BoqmDjnr) .IHrj7RhK .wlJhKwNH {
  46. width: 100%;
  47. background: linear-gradient(rgba(241,242,245,0),#eff0f3 5%,#eff0f3 10%);
  48. background: var(--navFooterWrapper--background);
  49. z-index: 1;
  50. font-family: PingFang SC,DFPKingGothicGB-Regular,sans-serif;
  51. font-weight: 400;
  52. display: none;
  53. }
  54. .midControlHigh .E89RjVdY {
  55. height: auto;
  56. bottom: 52px;
  57. transform: scale(1) ! important
  58. }
  59. .E7R0E__S .cG83852M {
  60. padding-right:10px;
  61. }
  62. .Pl5rTGP8 .byAYwK4P {
  63. padding: 0 14px;
  64. height: calc(100% - 0px) ! important;
  65. }
  66. }`;
  67.  
  68. // 插入样式
  69. const addStyle = (cssContent) => {
  70. const styleElement = document.createElement('style');
  71. styleElement.textContent = cssContent;
  72. document.head.appendChild(styleElement);
  73. };
  74.  
  75. addStyle(styleContent);
  76. })();