您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Make NotebookLM dialog fullscreen with proper content scaling
当前为
// ==UserScript== // @name NotebookLM Fullscreen // @namespace http://tampermonkey.net/ // @version 0.4 // @description Make NotebookLM dialog fullscreen with proper content scaling // @author You // @match https://notebooklm.google.com/* // @grant GM_addStyle // @run-at document-start // @license MIT // ==/UserScript== (function() { 'use strict'; const debug = { log: (...args) => console.log('[NotebookLM Debug]', ...args) }; // 监听 DOM 变化 const observer = new MutationObserver((mutations) => { mutations.forEach((mutation) => { // 检查是否存在对话框 const dialog = document.querySelector('.mat-mdc-dialog-container'); const container = document.querySelector('.cdk-overlay-container'); if (container) { if (dialog) { // 如果有对话框,设置背景色 container.style.backgroundColor = 'rgba(0, 0, 0, 0.8)'; } else { // 如果没有对话框,移除背景色 container.style.backgroundColor = 'transparent'; } } }); }); // 启动观察器 if (document.body) { observer.observe(document.body, { childList: true, subtree: true }); } else { document.addEventListener('DOMContentLoaded', () => { observer.observe(document.body, { childList: true, subtree: true }); }); } GM_addStyle(` /* 弹出框容器 */ .cdk-overlay-container { width: 100vw !important; height: 100vh !important; position: fixed !important; top: 0 !important; left: 0 !important; z-index: 9999 !important; display: flex !important; justify-content: center !important; align-items: center !important; transition: background-color 0.3s ease !important; } /* 弹出框包装器 */ .cdk-global-overlay-wrapper { width: 100vw !important; height: 100vh !important; position: fixed !important; top: 0 !important; left: 0 !important; margin: 0 !important; padding: 0 !important; } /* 弹出框内容 */ [_nghost-ng-c267097211], .mat-mdc-dialog-container, .mat-mdc-dialog-content, .note-editor { width: 100vw !important; height: 100vh !important; max-width: none !important; max-height: none !important; margin: 0 !important; padding: 0 !important; position: fixed !important; top: 0 !important; left: 0 !important; transform: none !important; box-sizing: border-box !important; } /* 编辑器内容 */ .ql-editor, .prosemirror-editor { height: calc(100vh - 64px) !important; width: 100% !important; padding: 20px 40px !important; box-sizing: border-box !important; overflow-y: auto !important; } /* 移除所有遮罩 */ .cdk-overlay-backdrop, .cdk-overlay-dark-backdrop, .cdk-overlay-backdrop-showing, .cdk-overlay-connected-position-bounding-box { display: none !important; opacity: 0 !important; visibility: hidden !important; pointer-events: none !important; } /* 修复主内容区域 */ .main-contents { pointer-events: auto !important; background: transparent !important; } /* 修复按钮样式 */ .note-header__controls { position: fixed !important; top: 12px !important; right: 12px !important; z-index: 10000 !important; display: flex !important; gap: 8px !important; } .note-editor-close-button { display: flex !important; align-items: center !important; justify-content: center !important; width: 40px !important; height: 40px !important; border-radius: 50% !important; background: rgba(255, 255, 255, 0.1) !important; border: none !important; cursor: pointer !important; color: var(--v2-on-surface-emphasis) !important; z-index: 10001 !important; } .note-editor-close-button:hover { background: rgba(255, 255, 255, 0.2) !important; } /* 确保按钮可点击 */ .mat-mdc-button-touch-target { pointer-events: none !important; } .mat-icon { pointer-events: auto !important; cursor: pointer !important; } `); debug.log('脚本加载完成'); })();