隐藏 Figma 中的无用元素

隐藏 Figma 中的无用元素, 如悬浮帮助按钮, 付费升级提示, 免费团队标识

目前为 2022-11-11 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Hide Useless Elements in Figma
  3. // @name:zh-CN 隐藏 Figma 中的无用元素
  4. // @namespace http://tampermonkey.net/
  5. // @description Hide useless elements in Figma, such as floating help button, upgrade section and free team badge
  6. // @description:zh-CN 隐藏 Figma 中的无用元素, 如悬浮帮助按钮, 付费升级提示, 免费团队标识
  7. // @version 0.1
  8. // @author ReekyStive
  9. // @match https://www.figma.com/*
  10. // @icon https://www.google.com/s2/favicons?sz=64&domain=figma.com
  11. // @license MIT
  12. // @grant none
  13. // ==/UserScript==
  14.  
  15. (function() {
  16. 'use strict';
  17.  
  18. let hideHomeUpgradeSection = true;
  19. let hideHomeFreeTeamBadget = true;
  20. let hideHelpFloatButton = true;
  21.  
  22. const style = document.createElement('style');
  23. style.innerHTML = ''
  24.  
  25. if (hideHomeUpgradeSection) {
  26. style.innerHTML += ' .upgrade_section--divider--2MVtg { display: none !important; } '
  27. style.innerHTML += ' .upgrade_section--redesignedUpgradeSection--1jT8s { display: none !important; } ';
  28. }
  29. if (hideHomeFreeTeamBadget) {
  30. style.innerHTML += ' .team_link--freeBadge--1RTa- { display: none !important; } '
  31. }
  32. if (hideHelpFloatButton) {
  33. style.innerHTML += ' .help_widget--helpWidgetContainer--2uGvh { display: none !important; } ';
  34. }
  35.  
  36. document.body.appendChild(style);
  37. })();