Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function mutationObserverCallback(mutations) {
- /* Grab the first mutation */
- var mutationRecord = mutations[0];
- /* If a child node was added,
- hide the msg after 2s */
- if (mutationRecord.addedNodes[0] !== undefined)
- setTimeout(hideMsg, 2000);
- }
- function hideMsg() {
- msg.textContent = '';
- msg.style.background = 'none';
- }
Add Comment
Please, Sign In to add comment