Google Slides Custom Plus Button

Add a custom button to Google Slides toolbar for additional features

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

// ==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();
})();