Mam taki kod ale nie wiem jak za to się zabrać.
<script> new MutationObserver(function (mutations) { mutations.some(function(mutation) { if (mutation.type === 'attributes' && mutation.attributeName === 'xxx') { console.log(mutation); console.log('Old src: ', mutation.oldValue); console.log('New src: ', mutation.target.xxx); return true; } return false; }); }).observe(document.body, { attributes: true, attributeFilter: ['xxx'], attributeOldValue: true, characterData: false, characterDataOldValue: false, childList: false, subtree: true }); setTimeout(function () { document.getElementById('xxx'); }, 3000); </script>