(function(){ var some_sliza_uniq_value_for_new_wgt = 0; if (document.body && document.body!==undefined) { appendWidget(); } else { if (window.addEventListener) { window.addEventListener("load", appendWidget); } else { window.attachEvent("onload", appendWidget); } } function appendWidget() { if (some_sliza_uniq_value_for_new_wgt || document.body ==undefined) { return; } if (typeof window.jQuery !== 'undefined') { var $wgtOverlay = jQuery('#sliza-wgt-overlay'); var $wgtBtn = jQuery('#sliza-wgt-button'); if ($wgtOverlay && $wgtOverlay.length) { $wgtOverlay.parent().remove(); jQuery('#sliza-widget-script').remove(); } if ($wgtBtn && $wgtBtn.length) { var container = $wgtBtn.parent()[0].nodeName.toLowerCase(); if (container == 'div') { $wgtBtn.parent().remove(); jQuery('#sliza-widget-script').remove(); } } } var wgt = document.createElement('div'); wgt.className = 'wgtWrap'; wgt.innerHTML = '
Выгрузить  каталог
'; document.body.appendChild(wgt); var jquery = document.createElement('script'); jquery.setAttribute('src', 'https://sliza.ru/wgt/js/jquery-2.2.4.min.js'); document.body.appendChild(jquery); if (jquery.scriptCharset) { jquery.charset = jquery.scriptCharset; } jquery.onload = jquery.onreadystatechange = function() { window.jQueryWgt = $.noConflict(true); addWgtScript(); }; some_unic_var_check_is_sliza_loaded = 1; } function removeJsWgt (filename, filetype) { var targetelement=(filetype=="js")? "script" : (filetype=="css")? "link" : "none" var targetattr=(filetype=="js")? "src" : (filetype=="css")? "href" : "none" var allsuspects=document.getElementsByTagName(targetelement) for (var i=allsuspects.length; i>=0; i--){ if (allsuspects[i] && allsuspects[i].getAttribute(targetattr)!=null && allsuspects[i].getAttribute(targetattr).indexOf(filename)!=-1) allsuspects[i].parentNode.removeChild(allsuspects[i]) } } function addWgtScript() { removeJsWgt("wgt.js", "js"); removeJsWgt("widget.php", "js"); var script = document.createElement('script'); script.setAttribute('src', 'https://sliza.ru/x/wgt/js/wgt.js?version=1.8'); script.setAttribute('charset', 'utf-8'); script.setAttribute('id', 'sliza-widget-script'); script.setAttribute('data-domain-protocol', 'https'); script.setAttribute('data-domain', 'sliza.ru'); script.setAttribute('data-wgt-every-restart', 'false' ); script.setAttribute('data-site-is-mlm', false ); script.setAttribute('data-widget-template', 'unauthorized'); script.setAttribute('data-widget-pro', false ); document.body.appendChild(script); var hostStyle = "https://sliza.ru/wgt/css/style.css?" + Math.random(); var link = document.createElement( "link" ); link.href = hostStyle; link.type = "text/css"; link.rel = "stylesheet"; document.head.appendChild(link); script.onload = function() { if (false) { parent.postMessage({ messageType: 'sliza_btn_pro_reload', }, '*'); } } } })();