12345678910111213141516171819202122232425262728293031323334 |
- // ==UserScript==
- // @name T-notion-字体修改
- // @author tianyunperfect
- // @description 简介
- // @version 1.0.0
- // @update 2021-07-08 16:16:14
- // @include https://*.notion.so/*
- // @require https://git.tianyunperfect.cn/tianyunperfect/web-base/raw/master/tmp/monkey/util.js?a=1
- // @require https://cdn.bootcdn.net/ajax/libs/js-cookie/3.0.1/js.cookie.min.js
- // @require https://cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js
- // ==/UserScript==
- (async () => {
- if (window.top !== window.self) {
- return;
- }
- if (location.href.indexOf("?v") > 0) {
- return;
- }
- axios.post(`https://web_history.tianyunperfect.cn/notion/insert`, {
- "notion_url": location.href.split("?")[0].split("/").pop().split("-").pop(),
- }).then(async res => {
- console.log(res.data)
- if (res.data.statusCode == 200) {
- (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();
- 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)"));
- if (font) {
- font.click();
- }
- }
- }).catch(function (error) {
- console.log(error);
- });
- })();
|