JustPaste
HomeCategoriesAboutDonateContactTerms of UsePrivacy Policy
JustPaste

Free online notepad — write and share instantly

Navigate

  • Home
  • Timeline
  • Categories

Info

  • About
  • Donate
  • Contact

Legal

  • Terms of Use
  • Privacy Policy

© 2026 JustPaste.app. All rights reserved.

Made with ♥ by JustPaste

Untitled Page | JustPaste.app
about 2 hours ago2 views
👨‍💻Programming

Untitled Page

// ==UserScript==
// @name         SBI Replace Download Button
// @namespace    http://tampermonkey.net/
// @version      5.3
// @description  Safely add Export as PDF beside SBI Download button
// @match        https://yonoretail.sbi.bank.in/*
// @grant        none
// @run-at       document-idle
// ==/UserScript==
(function () {
    'use strict';
    function replaceDownloadButton() {
        const labels = document.querySelectorAll('.mdc-button__label');
        labels.forEach(label => {
            if (label.textContent.trim() === "Download") {
                const oldButton = label.closest('button');
                if (!oldButton) return;
                const parentDiv = oldButton.parentElement;
                // Remove old button
                oldButton.remove();
                // If already created, don't create again
                if (parentDiv.querySelector('.custom-download-btn')) return;
                // Create new button
                const newBtn = document.createElement('button');
                newBtn.innerText = "Download";
                newBtn.className = "custom-download-btn";
                // Styling
                newBtn.style.borderRadius = "40px";
                newBtn.style.border = "2px solid #524a97";
                newBtn.style.padding = "10px 60px";
                newBtn.style.color = "#524a97";
                newBtn.style.backgroundColor = "rgba(82,74,151,0.12)";
                newBtn.style.cursor = "pointer";
                newBtn.style.boxShadow = "0 0 8px rgba(82,74,151,0.4)";
                newBtn.style.transition = "0.3s";
                parentDiv.appendChild(newBtn);
                console.log("Custom Download button created");
            }
        });
    }
    // Observe Angular DOM updates
    const observer = new MutationObserver(() => {
        replaceDownloadButton();
    });
    observer.observe(document.body, {
        childList: true,
        subtree: true
    });
})();
← Back to timeline