Skip to main content
search
0
All Posts By

vishal saurav

Close Menu
WhatsApp Chat
(function () { // Known PayU selectors + iframe fallbacks var WIDGET_SEL = [ '.pum_emi_widget', '#payu-emi-widget', '.payu-emi-container', '.payu-installment-widget', '[data-payu-emi]', 'iframe[src*="payu"]', 'iframe[src*="paynimo"]' ]; var TARGET_SEL = '.single-product .summary form.cart, .single-product .summary .cart'; function findWidget() { for (var i = 0; i < WIDGET_SEL.length; i++) { var sel = WIDGET_SEL[i]; var el = document.querySelector(sel); if (el) return el.tagName === 'IFRAME' ? (el.parentElement || el) : el; } return null; } function ensureVisible(el) { try { el.style.removeProperty('display'); el.style.setProperty('display', 'block', 'important'); el.style.setProperty('visibility', 'visible', 'important'); el.style.setProperty('opacity', '1', 'important'); el.style.setProperty('height', 'auto', 'important'); el.style.setProperty('max-height', 'none', 'important'); el.style.setProperty('overflow', 'visible', 'important'); el.style.setProperty('width', '100%', 'important'); } catch (e) {} } function moveWidget() { var el = findWidget(); var target = document.querySelector(TARGET_SEL); if (!el || !target) return false; if (el.dataset.xbMoved === '1') return true; ensureVisible(el); target.insertAdjacentElement('beforebegin', el); el.dataset.xbMoved = '1'; console.log('[PayU] moved & shown:', el); return true; } // Run, retry a bit, and observe late loads if (!moveWidget()) { var tries = 0; var iv = setInterval(function () { tries++; if (moveWidget() || tries > 60) clearInterval(iv); }, 250); new MutationObserver(moveWidget) .observe(document.documentElement, { childList: true, subtree: true }); } })();
Hit enter to search or ESC to close