notion-字体修改.js 1.2 KB

1234567891011121314151617181920212223
  1. // ==UserScript==
  2. // @name T-notion-字体修改
  3. // @author tianyunperfect
  4. // @description 简介
  5. // @version 1.0.0
  6. // @update 2021-07-08 16:16:14
  7. // @include https://*.notion.so/*
  8. // @require https://git.tianyunperfect.cn/tianyunperfect/web-base/raw/master/tmp/monkey/util.js?a=1
  9. // @require https://cdn.bootcdn.net/ajax/libs/js-cookie/3.0.1/js.cookie.min.js
  10. // ==/UserScript==
  11. (async () => {
  12. if (localStorage.getItem(location.href)) {
  13. return;
  14. } else {
  15. localStorage.setItem(location.href, "true")
  16. }
  17. (await getDom("#notion-app > div > div.notion-cursor-listener.showHoverText > div:nth-child(2) > div:nth-child(1) > div.notion-topbar > div:nth-child(1) > div.notion-topbar-action-buttons > div:nth-child(2) > div.notion-topbar-more-button.notion-focusable")).click();
  18. let font = (await getDom("#notion-app > div > div.notion-overlay-container.notion-default-overlay-container > div:nth-child(2) > div > div:nth-child(2) > div:nth-child(2) > div > div > div > div > div > div:nth-child(1) > div:nth-child(1) > div:nth-child(2) > div:nth-child(2)"));
  19. if (font) {
  20. font.click();
  21. }
  22. })();