Notion 浮动目录

使Notion的目录悬浮于左上方

当前为 2022-07-03 提交的版本,查看 最新版本

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name:en         Notion The content of the floating table
// @name            Notion 浮动目录
// @namespace       http://tampermonkey.net/
// @version         0.1
// @description:en  Make Notion's The content of the floating table
// @description     使Notion的目录悬浮于左上方
// @author          NellPoi
// @connect         notion.so
// @include         *://*.notion.*/*
// @icon            https://toppng.com/uploads/preview/notion-logo-11609370405b4cvyz4wit.png
// @grant           none
// @license         MIT
// ==/UserScript==

(function () {
    'use strict';
    // let style = document.createElement('style');
    // style.innerHTML = ".notion-table_of_contents-block{"+
    // "z-index: 1000 !important;\n" +
    // "position: fixed;\n" +
    // "width: auto !important;\n" +
    // "max-width: auto !important;\n" +
    // // "border: 1px solid red;\n" +
    // "background: white;\n" +
    // "box-shadow: rgba(15, 15, 15, 0.05) 0px 0px 0px 1px, rgba(15, 15, 15, 0.1) 0px 3px 6px, rgba(15, 15, 15, 0.2) 0px 9px 24px;\n" +
    // "border-radius: 4px;\n" +
    // "padding-left: 14px !important;\n" +
    // "padding-right: 14px !important;;\n" +
    // "margin-top: 6px !important;;\n" +
    // "top: 50px;\n" +
    // "right: 50px;\n" +
    // "}";
    // document.head.appendChild(style);

    let style = document.createElement('style');
    style.innerHTML = ".notion-table_of_contents-block{"+
    "z-index: 1000 !important;\n" +
    "position: fixed;\n" +
    "width: auto !important;\n" +
    "max-width: auto !important;\n" +
    // "border: 1px solid red;\n" +
    "top: 50px;\n" +
    "left: 50px;\n" +
    "}";
    document.head.appendChild(style);
})();