Greasy Fork 还支持 简体中文。

Annoyingtion - Remove annoying message on Notion

Remove specific HTML element on Notion pages

  1. // ==UserScript==
  2. // @name Annoyingtion - Remove annoying message on Notion
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.1
  5. // @description Remove specific HTML element on Notion pages
  6. // @author Laercio Nascimento
  7. // @match https://www.notion.so/*
  8. // @grant none
  9. // @license MIT
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. 'use strict';
  14.  
  15. var observer = new MutationObserver(function(mutationsList) {
  16. for (var mutation of mutationsList) {
  17. if (mutation.type === 'childList') {
  18. var addedNodes = mutation.addedNodes;
  19. for (var node of addedNodes) {
  20. if (node instanceof HTMLElement && node.tagName === 'DIV' &&
  21. node.previousElementSibling && node.previousElementSibling.classList.contains('notion-topbar')) {
  22. node.remove();
  23. }
  24. }
  25. }
  26. }
  27. });
  28.  
  29. observer.observe(document.documentElement, { childList: true, subtree: true });
  30. })();