Notion 浮动目录[Public archive]

使Notion的目录悬浮于左上方

当前为 2024-06-03 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name:en Notion The content of the floating table
  3. // @name Notion 浮动目录[Public archive]
  4. // @namespace http://tampermonkey.net/
  5. // @version 0.3
  6. // @description:en Make Notion's The content of the floating table
  7. // @description 使Notion的目录悬浮于左上方
  8. // @author NellPoi
  9. // @connect notion.so
  10. // @include *://*.notion.*/*
  11. // @icon https://toppng.com/uploads/preview/notion-logo-11609370405b4cvyz4wit.png
  12. // @grant none
  13. // @license MIT
  14. // ==/UserScript==
  15.  
  16. (function () {
  17. 'use strict';
  18. let forceEnable = false;
  19. if (forceEnable) {
  20. let style = document.createElement('style');
  21. style.innerHTML = ".notion-table_of_contents-block{" +
  22. "z-index: 1000 !important;\n" +
  23. "position: fixed;\n" +
  24. "width: auto !important;\n" +
  25. "max-width: auto !important;\n" +
  26. "top: 50px;\n" +
  27. "left: 50px;\n" +
  28. "background-color: #fff;\n" +
  29. "}";
  30. document.head.appendChild(style);
  31. }else{
  32. alert("您现在看到这条消息是来自Notion 浮动目录脚本的提示\n公告:由于Notion的更新,原浮动目录脚本已失效,官方已经优化了该功能,现在您可以删除该脚本了,如果你还想继续使用,请到源代码编辑let forceEnable = true;。")
  33. }
  34. })();