jQuery(window).on("load", function() { cookiesAndContentPolicyErrorMessage('', 'http://abrelosojosydisfruta.es'); }); var mutationTimer; MutationObserver = window.MutationObserver || window.WebKitMutationObserver; var observer = new MutationObserver(function(mutations, observer) { mutations.forEach(function (mutation) { [].filter.call(mutation.addedNodes, function (node) { return node.nodeName == "IFRAME"; }).forEach(function (node) { clearTimeout(mutationTimer); mutationTimer = setTimeout(function () { cookiesAndContentPolicyErrorMessage('', 'http://abrelosojosydisfruta.es'); }, 1000); }); [].filter.call(mutation.addedNodes, function (node) { return node.nodeName == "OBJECT"; }).forEach(function (node) { clearTimeout(mutationTimer); mutationTimer = setTimeout(function () { cookiesAndContentPolicyErrorMessage('', 'http://abrelosojosydisfruta.es'); }, 1000); }); }); }); observer.observe(document, { attributes: true, childList: true, attributeOldValue: true, subtree: true, });