Google Slides Custom Plus Button

Add a custom button to Google Slides toolbar for additional features

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

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

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==UserScript==
// @name         Google Slides Custom Plus Button
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Add a custom button to Google Slides toolbar for additional features
// @author       Your Name
// @match        https://docs.google.com/presentation/d/*
// @grant        none
// @run-at       document-end
// ==/UserScript==

(function() {
    'use strict';

    // Function to create and add a custom button to the toolbar
    const addCustomButton = () => {
        const toolbar = document.querySelector('[aria-label="Google Slides"] .punch-viewer-toolbar');
        if (toolbar) {
            // Create a new button
            const button = document.createElement('button');
            button.innerText = '+';
            button.style.marginLeft = '10px';
            button.style.fontSize = '20px';
            button.style.backgroundColor = '#f1f1f1';
            button.style.border = 'none';
            button.style.padding = '5px 10px';
            button.style.cursor = 'pointer';

            // Action for button click
            button.onclick = () => {
                // Example action: show an alert with options
                const action = prompt('Choose an action:\n1. Morph Transition\n2. Zoom\n3. Presenter Coach\n4. Animation\n5. Charts\n6. Slide Maker\n7. 3D Models\n8. Drawing\n9. Font Import\n10. Images');
                switch(action) {
                    case '1':
                        alert('Morph Transition feature (not implemented)');
                        break;
                    case '2':
                        alert('Zoom feature (not implemented)');
                        break;
                    case '3':
                        alert('Presenter Coach feature (not implemented)');
                        break;
                    case '4':
                        alert('Animation feature (not implemented)');
                        break;
                    case '5':
                        alert('Charts feature (not implemented)');
                        break;
                    case '6':
                        alert('Slide Maker feature (not implemented)');
                        break;
                    case '7':
                        alert('3D Models feature (not implemented)');
                        break;
                    case '8':
                        alert('Drawing feature (not implemented)');
                        break;
                    case '9':
                        alert('Font Import feature (not implemented)');
                        break;
                    case '10':
                        alert('Images feature (not implemented)');
                        break;
                    default:
                        alert('Invalid option');
                }
            };

            // Add button to toolbar
            toolbar.appendChild(button);
        } else {
            // Retry if toolbar not found
            setTimeout(addCustomButton, 1000);
        }
    };

    // Run the function to add the button
    addCustomButton();
})();