Toggle Docs Comments

toggle comments in google doc. You get a small button on the left bottom of your screen.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         Toggle Docs Comments
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  toggle comments in google doc. You get a small button on the left bottom of your screen.
// @include      https://*docs.google.*/document/*
// @author       andreask
// @match        https://*docs.google.*/document/*
// @require      http://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js
// @grant        GM_addStyle

// ==/UserScript==
/* globals jQuery, $, waitForKeyElements */
'use strict';
var link = window.document.createElement('link');
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = 'https://fonts.googleapis.com/icon?family=Material+Icons';
document.getElementsByTagName("HEAD")[0].appendChild(link);

$("body").append (''
    + '<div class="gmPersistentButton" style="position:fixed;bottom:1em;left:2em;z-index:6666;">'
    + '<button class="material-icons" id="gmContinueBtn" title="toggle comments">toggle_on</button>'
    + '</div>'
);

//--- Activate the button.
 $("#gmContinueBtn").click ( function () {
    var btnValue = this.textContent;
    if (btnValue == "toggle_on") {
        $(".kix-discussion-plugin").hide();
        this.textContent = "toggle_off"
    }
    else {
        $(".kix-discussion-plugin").show();
        this.textContent = "toggle_on"
    }
} );


// $(".kix-discussion-plugin").hide();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址