Notion 浮动目录[Public archive]

使Notion的目录悬浮于左上方

目前為 2024-06-03 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

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

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name:en         Notion The content of the floating table
// @name            Notion 浮动目录[Public archive]
// @namespace       http://tampermonkey.net/
// @version         0.3
// @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 forceEnable = false;
    if (forceEnable) {
        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" +
            "top: 50px;\n" +
            "left: 50px;\n" +
            "background-color: #fff;\n" +
            "}";
        document.head.appendChild(style);
    }else{
        alert("您现在看到这条消息是来自Notion 浮动目录脚本的提示\n公告:由于Notion的更新,原浮动目录脚本已失效,官方已经优化了该功能,现在您可以删除该脚本了,如果你还想继续使用,请到源代码编辑let forceEnable = true;。")
    }
})();