function reload() { location.reload(); } function init_iframe() { var a = 'comments_area'; var c = document.getElementById(a); if (c) { var data = c.dataset; var page_id = data.page; var return_url = data.url; if (!page_id || !return_url) { throw Error('Error!!!'); } var s = 'https://www.ixbt.com/live/custom/iframe/' + page_id + '/?return_url=' + encodeURI(return_url); var i = document.createElement('iframe'); i.style.borderWidth = 0; i.setAttribute('id', 'comments_iframe'); i.src = s; i.width = '100%'; c.appendChild(i); iFrameResize( { checkOrigin : false, heightCalculationMethod : 'lowestElement', inPageLinks : true, initCallback : function (i) { var hash = window.location.hash; hash = hash.slice(1); i.iFrameResizer.moveToAnchor(hash); } } , '#comments_iframe'); } } init_iframe();