Your IP : 216.73.216.189


Current Path : /var/www/magento.test.indacotrentino.com/www/buy/
Upload File :
Current File : /var/www/magento.test.indacotrentino.com/www/buy/indaco-autumnus-BB.js

var pathStore = 'autumnus';
var storeId = 2;
var domain = 'https://autumnus.indacotrentino.com/';

var timestamp = Date.now();
window['getUrlParameters'+timestamp] = function(url) {
    var params = {};
    var query = url.split('?')[1];
    if (query) {
        var paramArray = query.split('&');
        for (var i = 0; i < paramArray.length; i++) {
            var param = paramArray[i].split('=');
            params[param[0]] = param[1];
        }
    }
    return params;
}

window['loadRemote'+timestamp] = function() {
    var domain = 'https://autumnus.indacotrentino.com';
    var scriptUrl = document.currentScript.src;
    var scriptParams = window['getUrlParameters' + timestamp](scriptUrl);

    var iframeUrl = scriptParams.u; if (!iframeUrl) { iframeUrl = domain + '/buy/indaco-autumnus-BBGet.php?k='+scriptParams.k; }
    var divId = scriptParams.d; if (!divId) { divId = 'indacoContainer'; }
    var time = scriptParams.t; if (!time) { time = 2000; }
    var newHeight = scriptParams.h;

    var container = document.getElementById(divId);

    fetch(iframeUrl)
        .then(response => response.text())
        .then(content => {
            container.innerHTML = content;
            setTimeout(function () {
                if (!newHeight) {
                    height = (container.getElementsByTagName('iframe')[0].contentWindow.document.body.scrollHeight + 20);
                    newHeight = height + 'px';
                }
                container.getElementsByTagName('iframe')[0].style.height = newHeight;
                container.style.height = newHeight;
                if (height < 40) {
                    container.getElementsByTagName('iframe')[0].style.minHeight = '200px';
                    container.style.minHeight = '200px';
                }

            }, time);

        })
        .catch(error => {
            console.error('Errore durante il caricamento del file remoto:', error);
        });
}
window['loadRemote' + timestamp]();