Making MIUI forums usable

Disable all the annoying crap from the MIUI forums

安装此脚本?
作者推荐脚本

您可能也喜欢Reddit search on Google

安装此脚本
  1. // ==UserScript==
  2. // @name Making MIUI forums usable
  3. // @description Disable all the annoying crap from the MIUI forums
  4. // @version 1.4
  5. // @author Mario O.M.
  6. // @namespace https://github.com/marioortizmanero/
  7. // @match http://*.miui.com/*
  8. // @match https://*.miui.com/*
  9. // @match https://web.archive.org/web/*/http://*.miui.com/*
  10. // @match https://web.archive.org/web/*/https://*.miui.com/*
  11. // @grant none
  12. // ==/UserScript==
  13.  
  14. // This script isn't useful since the 8th of April, when the MIUI forums were merged into the Mi Community.
  15.  
  16. (function() {
  17. 'use strict';
  18. var to_remove = [
  19. 'cm', // Experience widget under upvoted posts
  20. 'md_ctrl', // Big medals in the user data
  21. 'sign', // Signature under the comments
  22. 'pil cl', // Credits and such data under the profile image
  23. 'b_rad_5', // Profile icons
  24. 'pbg2', // Small experience bar under the profile icon
  25. 'start', // Small medals under the profile icon
  26. ];
  27.  
  28. for (let i = 0; i < to_remove.length; i++) {
  29. let element = document.getElementsByClassName(to_remove[i]);
  30. while (element.length > 0) {
  31. element[0].parentNode.removeChild(element[0]);
  32. }
  33. }
  34.  
  35. const margins1 = document.getElementsByClassName('plc'); // Margins between comments 1
  36. for (let i = 0; i < margins1.length; i++) {
  37. margins1[i].style.padding = "4px 10px";
  38. }
  39.  
  40. const margins2 = document.getElementsByClassName('t_fsz'); // Margins between comments 2
  41. for (let i = 0; i < margins2.length; i++) {
  42. margins2[i].style.minHeight = "40px";
  43. }
  44.  
  45. const stamp = document.getElementById('threadstamp'); // Stamp in some posts
  46. stamp.style.display = "none";
  47. })();

QingJ © 2025

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