Google Slides Custom Plus Button

Add a custom button to Google Slides toolbar for additional features

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Zateb bir user-style yöneticim var, yükleyeyim!)

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