您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Allow editing in Google Docs viewer mode
当前为
// ==UserScript== // @name Google Docs Viewer to Editable Mode // @namespace http://tampermonkey.net/ // @version 0.1 // @description Allow editing in Google Docs viewer mode // @author You // @match https://docs.google.com/document/d/*/view* // @grant none // @license MIT // ==/UserScript== (function() { 'use strict'; // Wait for the document content to load function waitForDocument() { const editableDiv = document.querySelector('.kix-appview-editor'); // The editable div class in Google Docs. if (editableDiv) { enableEditing(); } else { setTimeout(waitForDocument, 1000); } } // Convert the document to editable mode by enabling DOM manipulation function enableEditing() { // Remove the 'view-only' overlays and restrictions const viewerOverlay = document.querySelector('.kix-viewer-overlay'); if (viewerOverlay) { viewerOverlay.style.display = 'none'; } // Force editable mode on the document body or specific areas const body = document.querySelector('.kix-appview-editor'); if (body) { body.contentEditable = true; body.setAttribute('data-disable-input', 'false'); } console.log('Google Docs in viewer mode is now editable.'); } // Start the process once the page is ready waitForDocument(); })();