Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(document).ready(function () {
- /*
- for(var i=1;i<=2;i++){
- //$('#zedoads'+i).append('yipee! an advertisement');
- //document.write('<div id="zedoads'+i+'" style="visibility: hidden;">yipee! an advertisement</div>');
- checkAds('zedoads'+i);
- }*/
- setTimeout(checkAds.bind(null, 'zedoads1'), 4000);
- })
- function openPopup() {
- var win_height_n = $(document).height();
- var win_width_n = $(window).width();
- var popup_width = $('#adbocker_alt .popup').width();
- win_width_n = win_width_n - popup_width;
- win_width_n = win_width_n / 2;
- $('html, body').animate({
- scrollTop : 0
- }, 500);
- //$('#adbocker_alt .popup').css('left', win_width_n);
- $('#adbocker_alt .overlay, #adbocker_alt').css('height', win_height_n + 800);
- $('#adbocker_alt .popup').fadeIn();
- var c = $('#zedoads1').attr('data-zedoads');
- ga('send', 'event', 'AdblockPopup', c, 'true');
- $('#adbocker_alt .close').click(function () {
- $(this).parent('div').fadeOut();
- $('#adbocker_alt .overlay').fadeOut();
- $('#adbocker_alt').remove();
- });
- }
- function checkAds(adsId) {
- var c = $('#zedoads1').attr('data-zedoads');
- if ($('#' + adsId).height() == 0 || $('#' + adsId).height() == '0') {
- ga('send', 'event', 'Adblock', c, 'true'); //ga('send','_trackEvent','WriteAdblock','true');
- openPopup();
- } else {
- ga('send', 'event', 'Adblock', c, 'false'); //ga('send','_trackEvent','WriteAdblock','false');
- }
- }
- function checkAdsOld(adsId) {
- var c = $('#' + adsId).attr('data-zedoads');
- if (document.getElementById(adsId) != undefined) {
- if ($('#' + adsId).height() == 0 || $('#' + adsId).height() == '0') {
- ga('send', 'event', 'Adblock', c, 'true'); //ga('send','_trackEvent','WriteAdblock','true');
- //window.location.href = '/ad-blocker.php?ref_url='+window.location;
- openPopup();
- //alert('blocked: '+c);
- } //alert($('#'+adsId).height());
- } else {
- if (c != undefined) {
- ga('send', 'event', 'Adblock', c, 'false'); //ga('send','_trackEvent','WriteAdblock','false');
- // alert('open: '+c);
- }
- //ga('send', 'event', 'Test_AdDisplay', 'No',c);
- //ga('send', 'event', 'Adblock', 'Yes', 'AdblockYes'); alert('Yes');
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment