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
1 day ago3 views
👨‍💻Programming

Untitled Page

// ==UserScript==
// @name         Hide EPF Error Message (Advanced)
// @namespace    http://tampermonkey.net/
// @version      2.0
// @match        *://passbook.epfindia.gov.in/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    const DEBUG = true; // Set to false to disable console logs

    function log(...args) {
        if (DEBUG) console.log('[EPF Script]', ...args);
    }

    function removeError() {
        // Target 1: By exact element with error icon
        const errorIcon = document.querySelector('.fa-info-circle');
        if (errorIcon) {
            errorIcon.parentElement.style.display = 'none';
            log('✓ Removed error icon container');
        }

        // Target 2: By element ID (if it has one)
        const errorElements = document.querySelectorAll('[id*="error"], [id*="Error"]');
        errorElements.forEach(el => {
            el.style.display = 'none';
            log('✓ Removed element:', el.id);
        });

        // Target 3: Remove specific text
        const walker = document.createTreeWalker(
            document.body,
            NodeFilter.SHOW_TEXT,
            null,
            false
        );

        let node;
        while (node = walker.nextNode()) {
            if (node.textContent.includes('Error-NO')) {
                node.parentElement.style.display = 'none';
                log('✓ Removed text node parent');
            }
        }
    }

    // Run on page load
    if (document.readyState === 'loading') {
        document.addEventListener('DOMContentLoaded', removeError);
    } else {
        removeError();
    }

    // Watch for dynamic changes
    new MutationObserver(removeError).observe(document.body, {
        childList: true,
        subtree: true
    });

    log('Script initialized');
})();
← Back to timeline