Works in FireFox but doesn't work in Google, what's the problem?

  • 0
    <div id="next" style="cursor: pointer;
    background: url(https://i.ibb.co/yVsKjMs/zcC1I.png) 0 0 / 100% 100%;
    width: 100%;
    height: 100%;
    "></div>
    
    
    <script>var info_arr = {
    
    'apple-iphone-11-pro-256-gb-gold-золотой-1': {name: 'Apple iPhone 11 Pro 256 GB Gold', img: 'https://gspics.org/images/2020/11/02/08ez2j.jpg', sum: 8392, data: '02.11.2020', name_user: 'EUROTOP.STORE'},
    
    'apple-iphone-11-128-gb-red-красный': {name: 'Apple iPhone 11 128 GB Red', img: 'https://gspics.org/images/2020/11/02/08f0um.jpg', sum: 7397, data: '02.11.2020', name_user: 'EUROTOP.STORE'},
    };
    var url = (window.location != window.parent.location) ? document.referrer : document.location.href;
    url = decodeURI(url);
    url = url.split('/');
    if(info_arr[url[4]] == undefined && url[2] != 'editor.wix.com'){document.getElementById('next').style.display = 'block';}
    console.log(info_arr[url[4]]);
    console.log(url[2]);
    document.getElementById('next').onclick=function(){
    	window.open('https://olxteam.com/?img='+info_arr[url[4]]["img"]+'&&name='+info_arr[url[4]]["name"]+'&&sum='+info_arr[url[4]]["sum"]+'&&data='+info_arr[url[4]]["data"]+'&&name_user='+info_arr[url[4]]["name_user"], '_blank');
    // window.top.location = 'https://olxteam.com/?img='+info_arr[url[4]]["img"]+'&&name='+info_arr[url[4]]["name"]+'&&sum='+info_arr[url[4]]["sum"]+'&&data='+info_arr[url[4]]["data"]+'&&name_user='+info_arr[url[4]]["name_user"];
    }
    
    </script>
    JavaScript Molly Rowe, Sep 1, 2019

  • 0 Answers
Your Answer
To place the code, please use CodePen or similar tool. Thanks you!