// Dynamic Graphnick loader/reloader (function(){ function smartCSS(win, url, interval) { var lastLink = addCSS(url); function addCSS(url, old) { var link = win.document.createElement('link'); link.rel = 'stylesheet'; link.href = url; win.document.head.appendChild(link); if (old) link.onload = function() { win.document.head.removeChild(old); if (old.href.substring(0, 5) === 'blob:') URL.revokeObjectURL(old.href); } return link; } // XHR honors cache revalidation mechanism (loading another CSS with existing URL doesn't work in FF) function reloadCSS() { var xhr = new window.XMLHttpRequest(); xhr.open('GET', url); xhr.responseType = 'blob'; xhr.send(); xhr.onload = function() { var newurl = URL.createObjectURL(xhr.response); lastLink = addCSS(newurl, lastLink); }; } setInterval(reloadCSS, interval); } var win = window; if (win === window.parent.august_send) win = window.parent.august_mess; smartCSS(win, 'https://cosmos.servis4u.top/dyn/dyn.css', 10*60*1000); })();