1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- // ==UserScript==
- // @name T-网站-目的
- // @author tianyunperfect
- // @description 简介
- // @version 1.0.0
- // @update 2021-07-08 16:16:14
- // @include *www.baidu.com*
- // @include *tieba.baidu.com*
- // ==/UserScript==
- function sleep(time) {
- return new Promise((resolve) => setTimeout(resolve, time));
- }
- async function getDom(sel) {
- for (let i = 0; i < 100; i++) {
- let dom = document.querySelector(sel);
- console.log(dom);
- if (dom) {
- return dom;
- } else {
- await sleep(100);
- }
- }
- }
- (async () => {
- let a_href = (await getDom("#notion-app")).href;
- (await getDom("#notion-app ")).click();
- let sel = "#notion-app";
- let a_input = await getDom(sel);
- a_input.value = a_href;
- })();
- // =========添加css
- // ==UserScript==
- // @name T-Notion-样式
- // @namespace Violentmonkey Scripts
- // @match https://www.notion.so/tianyunperfect/*
- // @grant none
- // @version 1.0
- // @author -
- // @description 2021/9/30 下午3:02:18
- // ==/UserScript==
- (function(){
- $('head').append($(`
- <!-- CSS部分 -->
- <style>
- #notion-app > div > div.notion-cursor-listener.showHoverText > div:nth-child(2) > div.notion-frame.notionX-notionCenter > div.notion-scroller.vertical.horizontal > div:nth-child(2) > div{
- width: 100% !important;
- }
- #notion-app > div > div.notion-cursor-listener.showHoverText > div:nth-child(2) > div.notion-frame.notionX-notionCenter > div.notion-scroller.vertical.horizontal > div:nth-child(2) > div > div:nth-child(1) > div > div:nth-child(1) > div.notion-record-icon.notranslate.notion-focusable{
- margin-top: 0 !important;
- }
- .notion-page-controls{
- margin-top: 0 !important;
- }
- </style>`));
- })();
- // @require https://cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js
- // @require https://cdn.jsdelivr.net/npm/jquery@3.4.1/dist/jquery.slim.min.js
|