Ultra Lite QZone

重新排版并移除了许多冗余元素,搭配Dark Reader使用更佳。请调整主页排版至默认(“社交元素”)以取得最佳使用效果。

  1. // ==UserScript==
  2. // @name Ultra Lite QZone
  3. // @license MIT
  4. // @namespace http://tampermonkey.net/
  5. // @version 0.2
  6. // @description 重新排版并移除了许多冗余元素,搭配Dark Reader使用更佳。请调整主页排版至默认(“社交元素”)以取得最佳使用效果。
  7. // @author MFn
  8. // @match http://qzone.qq.com/*
  9. // @match https://qzone.qq.com/*
  10. // @match http://*.qzone.qq.com/*
  11. // @match https://*.qzone.qq.com/*
  12. // @match https://i.qq.com/?s_url=http%3A%2F%2Fuser.qzone.qq.com%2*
  13. // @icon https://user.qzone.qq.com/favicon.ico
  14. // @grant GM_addStyle
  15. // @grant unsafeWindow
  16. // ==/UserScript==
  17.  
  18. //下为本user script设置(config),修改后请按 ctrl + s 保存。
  19. //每次更新可能需要再次手动修改,但这比cookie好操作很多
  20. const config = {
  21. background: {
  22. enable: true,//是否修改背景,true=是,false=否,下同
  23. cover: true,//是否开启背景暗角
  24. src: "https://i0.imgs.ovh/2024/02/02/bsxwl.jpeg"//图床:imgloc.com,这是背景路径,填写你的背景图直链,(应该)不支持file:/// .
  25. },
  26. animation: {
  27. transition: true//是否开启过渡动画(感觉好像没啥用的样子……)
  28. }
  29. };
  30.  
  31. (function() {
  32. 'use strict';
  33. console.log("Ultra Lite QZone By MFn.");
  34. GM_addStyle(".lay_wrap .lay_foot .login_device li a:hover {top:0 !important;background-color: #000000aa;border-radius: 15px;}");
  35. //登陆界面下方图标抖动bug。。。解决方式就是直接不位移
  36. GM_addStyle("ul#feed_friend_list {border: 1px #e6e6e6 solid !important;border-radius: 3px;background: white;width: fit-content;}");
  37. GM_addStyle(".fn-feed-control-v2 .control-inner {border: 1px #e6e6e6 solid !important;border-radius: 3px;background: white;}");
  38. //主要部分边框重写,防止无背景时与背景相连
  39. GM_addStyle(".bg-body{background-image:none !important;background-color:#dcdcdc;}");
  40. GM_addStyle(".background-container{background-image:none !important;}");
  41. //去除原本的背景图
  42. GM_addStyle("a.qz-btn-vip.qz-btn-vip-open {visibility: hidden;}");
  43. GM_addStyle(".profile-hd-actions{display: none !important;}");
  44. GM_addStyle("i.ui-icon.icon-vip {display: none !important;}");
  45. //去VIP等
  46. GM_addStyle(".layout-nav .head-avatar {border: 1px #e6e6e6 solid !important;border-radius: 3px;bottom: 60px;");
  47. GM_addStyle("div#vipBottomAdContainer {display: none;}");
  48. //头像位置
  49. GM_addStyle(".layout-nav .head-avatar .head-avatar-edit .avatar-edit-list {top: -60px;position: absolute;width: 120px;height: 60px;}");
  50. //修改头像优化
  51. GM_addStyle(".head-nav .head-nav-menu {background-color:white; width: 912px;height: 50px;font-size: 14px;margin-left: -150px;border: 1px #e6e6e6 solid !important;border-radius: 3px;}")
  52. //头像下一排边框。。。可见架构混乱程度
  53. GM_addStyle(".layout-head .head-info {position: absolute;top: 180px;left: 680px !important;}");
  54. GM_addStyle("div#visitorsDiv {top: 170px;left: 850px;}");
  55. //info位置(就是空间名字)
  56. GM_addStyle(".layout-head .head-info, .layout-head .head-description a, .layout-head .head-name .user-name, .layout-head .head-detail-name .user-name, .layout-head .qz-progress-bar .progress-bar-info {color: white;}");
  57. GM_addStyle(".layout-head .weather-module, .layout-head .visit-module {color: antiquewhite;}");
  58. //字体颜色修改
  59. GM_addStyle("a#site_hot_btn {display: none !important;}");
  60. GM_addStyle(".mod-side-nav.mod-side-nav-recently-used {display: none;}");
  61. //去广告
  62. GM_addStyle(".ui_avatar {border-radius: 100%;overflow: hidden;}");
  63. GM_addStyle(".feed .avatar a {border-radius: 100%;}");
  64. //圆形头像
  65. GM_addStyle("div#ifeedsContainer {background-color: white;}");
  66. //主要部分白色背景,为了防止添加背景后的连接处透明
  67. //以下是其他界面适配。。。(以上是main)
  68. GM_addStyle("div#feed_me {border: 1px #e6e6e6 solid !important;position: absolute;width: 592px;}");
  69. GM_addStyle("div#qz_poster_v4_editor_container_1 {border: 0.5px #e6e6e6 solid !important;width: 592px !important;}");
  70. GM_addStyle(".bg_mode.bg {border: 1px #e6e6e6 solid !important;padding-bottom: 100px;}");
  71. GM_addStyle(".mod_wrap.bg.mod-wrap {border: 1px #e6e6e6 solid !important;}");
  72. GM_addStyle(".top-fix-bar .top-fix-inner {background-color: #000000cc;box-shadow: 1px 1px 5px #000000bb;}");//top bar
  73. GM_addStyle("div#_qz_zoom_detect {display: none;}");//奇怪的flash。。
  74. GM_addStyle(".fn-dialog-hide-feed {background: white;}");
  75.  
  76. if(config.animation.transition == true){
  77. //过渡动画
  78. GM_addStyle("html{transition: all 0.5s ease-out;}");
  79. }
  80. if(config.background.enable == true) {
  81. //GM_addStyle(".bg-body:not(#pageApp), .layout-background:not(#pageApp), .layout-head, .layout-nav {z-index:-5; background: url("+ config.background.src +") fixed !important;}");
  82. //这个效果并不好,所以我使用了下面的方法
  83. //美化背景
  84. let bgimg = document.createElement("div");
  85. bgimg.setAttribute("class","bgimg");
  86. document.body.append(bgimg);
  87. GM_addStyle(".bgimg {z-index: -5;position: fixed;left: 0;top: 0;width: 100%;height: 100%;background: url("+ config.background.src +") fixed !important;}");
  88. }
  89. if(config.background.cover == true){
  90. //背景暗角(来自limestart)
  91. let cover = document.createElement("div");
  92. cover.setAttribute("class","cover");
  93. document.body.append(cover);
  94. GM_addStyle(".cover {z-index: -2;position: fixed;left: 0;top: 0;width: 100%;height: 100%;background-image: radial-gradient(rgba(0,0,0,0) 0,rgba(0,0,0,.5) 100%),radial-gradient(rgba(0,0,0,0) 33%,rgba(0,0,0,.3) 166%);transition: .25s;}");
  95. }
  96.  
  97. GM_addStyle(".layout-nav {background: transparent;}");
  98. GM_addStyle(".layout-background {background: transparent;}");
  99. //访问其他人的空间时遇到的小bug,改成透明就解决了
  100. })();