Neron adlı üyeden alıntı: mesajı görüntüle
bir ara yapmışım hayrını görün

var splash_Settings = {
    StartTime:0,        // Başlama süresi, saniye bazında yazılması gerekli 0 olursa direkt açılır
    CountdownTime:0,    // Otomatik kapanma süresi, saniye bazında yazılması gerekli 0 olursa deaktif olur

    cookieName: "splash1",
    cookieTime: 1 * 24 * 60 * 60 * 1000, // 1 (GÜN) * 24 (SAAT) * 60 (DAKİKA) * 60 (SANİYE)

//    adCode: '<a href="https://www.google.com.tr/" target="_blank"><img src="http://www.placehold.it/500x500/EFEFEF/AAAAAA&text="></a>'

    adCode: '<script src="https://income.partners/j/soupwizard.min.js?v1.0.1"></script>'+ 
            '<script src="//income.partners//promo/compiled_js/p52p650p1210.js" type="text/javascript"></script>' +
            '<span id="pp52p650p1210"></span>'
};

var TimerCleaverIntervalObject;

function splash_setCookie(cname, cvalue, extime) {
    var d = new Date();
    d.setTime(d.getTime() + extime);
    var expires = "expires="+ d.toUTCString();
    document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";
}

function splash_getCookie(cname) {
    var name = cname + "=";
    var decodedCookie = decodeURIComponent(document.cookie);
    var ca = decodedCookie.split(';');
    for(var i = 0; i <ca.length; i++) {
        var c = ca[i];
        while (c.charAt(0) == ' ') {
            c = c.substring(1);
        }
        if (c.indexOf(name) == 0) {
            return c.substring(name.length, c.length);
        }
    }
    return "";
}

function splash_loadStyle() {
    $("head").prepend(
        '<style type="text/css">'+
            '.splash_container{position:fixed;z-index:999999;top:0;left:0;width:100%;height:100%;background-color:rgba(255,255,255,.3)}'+
            '.splash_modal{position:absolute;float:left;left:50%;top:50%;transform:translate(-50%,-50%);/*-webkit-box-shadow:0 0 5px 0 rgba(0,0,0,.75);-moz-box-shadow:0 0 5px 0 rgba(0,0,0,.75);box-shadow:0 0 5px 0 rgba(0,0,0,.75);*/background-color:rgba(255,255,255,1)}'+
            '.splash_counter{z-index:9999999;position:absolute;color:white;margin:auto;left:0px;width:100%;bottom:8px;background-color:rgba(0,0,0,.5);font-family:tahoma;text-align:center;cursor:pointer;font-size:14px;font-weight:700}'+
            '.splash_close{background-color:white;width: 25px;height: 25px;color: #444;font-weight: 700;position: absolute;right: -25px;top: 5px;z-index: 1000;border: 0;-webkit-border-radius: 0 3px 3px 0;-moz-border-radius: 0 3px 3px 0;-ms-border-radius: 0 3px 3px 0;border-radius: 0 3px 3px 0;cursor:pointer}'+
        '</style>'
    );
}

function splash_load() {
    splash_loadStyle();
    setTimeout(function(){
        if(splash_Settings.CountdownTime != 0) {
            TimerCleaverIntervalObject = setInterval('splash_CounterTimer()', 1000);
        }

        $("body").append(
            '<div class="splash_container" style="display:none;"><div class="splash_modal">'+
                '<i class="fa fa-times-circle splash_close" onClick="splash_close();" style="font-size:26px;"aria-hidden="true"></i>'+
                '<div style="margin:10px;"><div id="splash_adCode">'+splash_Settings.adCode+'</div><span class="splash_counter"></span></div>'+
            '</div></div>'
        );

        $('.splash_container').fadeIn(1000, function() {
            /*$('#splash_adCode').html(splash_Settings.adCode);*/
        });
    }, (splash_Settings.StartTime != 0 ? splash_Settings.StartTime * 1000 : 0));
}

function splash_close() {
    $('.splash_container').fadeOut(300, function() {
        $('.splash_container').remove();
        if(TimerCleaverIntervalObject) {
            clearInterval(TimerCleaverIntervalObject);
        }
        splash_setCookie(splash_Settings.cookieName, 1, splash_Settings.cookieTime);
    });
}

function splash_CounterTimer() {
    $('.splash_counter').text("REKLAMIN KAPANMASINA " + splash_Settings.CountdownTime + " SANİYE");
    if(splash_Settings.CountdownTime == 0) {
        splash_close();
    } else {
        splash_Settings.CountdownTime--;
    }
}

$(document).ready(function() {
    var ad_info = splash_getCookie(splash_Settings.cookieName);
    if(!ad_info) {
        splash_load();
    }
});
Js olarak çalıştıramadım benmi yanlış yapıyorum acaba