2024-10-16 19:57:19 +03:00
|
|
|
(function() {
|
|
|
|
console.log('External script loaded to disable qdnGatewayShowModal');
|
|
|
|
|
2024-10-16 23:42:55 +03:00
|
|
|
const timeoutDuration = 5000; // Set timeout duration to 5 seconds (5000ms)
|
|
|
|
let elapsedTime = 0; // Track the time that has passed
|
|
|
|
|
2024-10-16 19:57:19 +03:00
|
|
|
// Poll for qdnGatewayShowModal and disable it once it's defined
|
|
|
|
const checkQdnGatewayInterval = setInterval(() => {
|
2024-10-16 23:42:55 +03:00
|
|
|
elapsedTime += 100; // Increment elapsed time by the polling interval (100ms)
|
|
|
|
|
2024-10-16 19:57:19 +03:00
|
|
|
if (typeof window.qdnGatewayShowModal === 'function') {
|
|
|
|
console.log('Disabling qdnGatewayShowModal');
|
|
|
|
|
|
|
|
// Disable qdnGatewayShowModal function
|
|
|
|
window.qdnGatewayShowModal = function(message) {
|
|
|
|
console.log('qdnGatewayShowModal function has been disabled.');
|
|
|
|
};
|
|
|
|
|
|
|
|
// Stop checking once qdnGatewayShowModal has been disabled
|
|
|
|
clearInterval(checkQdnGatewayInterval);
|
2024-10-16 23:42:55 +03:00
|
|
|
} else if (elapsedTime >= timeoutDuration) {
|
|
|
|
console.log('Timeout reached, stopping polling for qdnGatewayShowModal.');
|
|
|
|
clearInterval(checkQdnGatewayInterval); // Stop checking after 5 seconds
|
|
|
|
}
|
2024-10-16 19:57:19 +03:00
|
|
|
}, 100); // Check every 100ms
|
|
|
|
|
|
|
|
})();
|