Перейти из форума на сайт.

НовостиФайловые архивы
ПоискАктивные темыТоп лист
ПравилаКто в on-line?
Вход Забыли пароль? Первый раз на этом сайте? Регистрация
Компьютерный форум Ru.Board » Компьютеры » Программы » Блокировка рекламы в браузере (часть 3)

Модерирует : gyra, Maz

gyra (29-01-2019 23:26): Блокировка рекламы в браузере (часть 4)  Версия для печати • ПодписатьсяДобавить в закладки
На первую страницук этому сообщениюк последнему сообщению

   

mikhaelkh

Full Member
Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору

Код:
https://www.inoreader.com/include/site_js/index_js.js,qv=11.3.2,ats=1546416227.pagespeed.jm.8Zhj8Jth5m.js

Код:
function adb_detected(code, force) {
    if (user_access[access_starter]) {
        return;
    }
    if (user_registered_since < ads_graceful_period) {
        return;
    }
    log_ga_event('Adblock detect', 'Adblock detect', 'Detected');
    var html = '<div class="adb_left"><img src="/images/adb_detected.png"></div>';
    html += '<div class="adb_right">';
    html += '<div class="adb_right_header">' + _js('Adblock Detected!') + '</div>';
    html += '<div class="adb_right_body">' + _js('Ads do help us to keep Inoreader running, so please support us by whitelisting our site in your Adblocking software.') + ' ' + _js("Apart from your browser adblocker, you may have to whitelist us in your VPN/Security software's adblockers as well.") + ' ' + _js('Once done, just refresh this web page.') + ' ' + _js('You can also upgrade to our Starter plan to remove all ads.') + '</div>';
    html += '<div class="adb_right_link_active"><a class="bluelink underlink" href="javascript:void(0);" onclick="adb_upgrade()">' + _js('Upgrade for an ad-free experience') + '</a></div>';
    html += '<div class="adb_right_link_passive"><a class="graylink underlink" href="javascript:void(0);" onclick="adb_close()">' + _js('Not now (maybe next time)') + '</a></div>';
    if (code) {
        html += '<div class="adb_error_code graylink">' + code + '</div>';
    }
    html += '</div>';
    dialog(adb_id, {
        content: html
    });
    return;
    var $top_notifications = $('#sitecontent').find('>.top_notification');
    if ($top_notifications[0]) {
        $top_notifications.each(function() {
            $(this).remove();
        });
    }
    var html = '<div class="alert_state green_state top_notification" id="consent_bbb">' + sprintf(_js("Please support this software by whitelisting inoreader.com in your Ad blocker or %s."), "<a class=\"whitelink underlink ajaxed\" href=\"/upgrade/feature/noads\" onclick=\"l(\'Upgrade links\',\'Link (Adblock banner)\');\">" + _js("purchasing a premium plan") + "</a>") + ' ' + _js("Thank you!") + '<div class="info_close" onclick="info_close(\'bbb\',7)" title=' + _js("Close this message") + '><span class="icon-cross"></span></div>';
    $('#sitecontent').prepend(html);
    resize();
}
 
function gestapo_raid(ad_id) {
    error_code = 'MHgwMA==';
    var $v = $('#' + ad_id);
    if ($v.data('entry')) {
        current_raid--;
        console_log(ad_id + ' - has entry');
        return error_code;
    }
    if (!$v[0]) {
        error_code = 'MHgwMQ==';
    } else if ($v.html() == '') {
        error_code = 'MHgwMg==';
    } else if (ad_id != 'sinner_container' && $v.html().indexOf('/adv/www/delivery/ajs.php') === -1) {
        error_code = 'MHgwMw==';
    } else if ($v.html().indexOf('beacon_') === -1) {
        error_code = 'MHgwNA==';
    } else if (!$v.find('script')) {
        error_code = 'MHgwNQ==';
    } else if (!$v.find('img')) {
        error_code = 'MHgwNg==';
    } else if ($v[0].lastChild.nodeName == 'SCRIPT' && $v[0].lastChild.src.indexOf('/adv/www/delivery/ajs.php') !== -1) {
        error_code = 'MHgwNw==';
    } else if ($v.css('display') == 'none') {
        error_code = 'MHgwOA==';
    } else if ($v.css('visibility') == 'hidden') {
        error_code = 'MHgwOQ==';
    } else if (!$v.is(':visible')) {
        error_code = 'MHgwYQ==';
        if (ad_id.indexOf('side_ad') !== -1) {
            current_raid = max_raids;
            gestapo_crimes_num = max_raids;
        }
    } else if (ad_id == 'sinner_container' && $v.height() < 600 && $v.width() < 160) {
        error_code = 'MHgwYg==';
        current_raid = max_raids;
        gestapo_crimes_num = max_raids;
    } else if (ad_id == 'sinner_container' && $('#reader_pane').css('padding-' + float_right) == '0px') {
        error_code = 'MHgwYw==';
        current_raid = max_raids;
        gestapo_crimes_num = max_raids;
    } else if (ad_id.indexOf('leaderboard_ad') !== -1) {
        if (!$v.next().hasClass('ad_title')) {
            error_code = 'MHgwZA==';
            current_raid = max_raids;
            gestapo_crimes_num = max_raids;
        } else {
            if (!$v.next().is(':visible')) {
                error_code = 'MHgwZQ==';
                current_raid = max_raids;
                gestapo_crimes_num = max_raids;
            }
        }
    }
    console_log(ad_id + ' - ' + error_code);
    return error_code;
}
 
function gestapo(ad_id) {
    if (user_access[access_starter]) {
        current_raid = max_raids;
        return;
    }
    raid_timer = setTimeout(function() {
        if (current_raid >= max_raids) {
            return false;
        }
        var error_code = gestapo_raid(ad_id);
        if (error_code !== 'MHgwMA==') {
            gestapo_crimes_num++;
            gestapo_crimes[error_code] = true;
        }
        current_raid++;
        console_log('raid ' + current_raid + ' of ' + max_raids + '. Crimes ' + gestapo_crimes_num);
        if (current_raid >= max_raids) {
            if (gestapo_crimes_num >= current_raid && !gestapo_notified) {
                var error_codes = [];
                for (var key in gestapo_crimes) {
                    if (gestapo_crimes.hasOwnProperty(key)) {
                        error_codes.push(atob(key));
                    }
                }
                var alibi = false;
                $('#reader_pane').find('.sinner').each(function() {
                    var tmp_error_code = gestapo_raid(ad_id);
                    if (tmp_error_code == 'MHgwMA==') {
                        alibi = true;
                    }
                });
                if (!alibi) {
                    adb_detected(error_codes.join(', '));
                    gestapo_notified = true;
                } else {
                    adb_not_detected();
                    gestapo_notified = true;
                }
            } else {}
            return false;
        }
    }, Math.floor(Math.random() * 1999) + 1111);
}

Всего записей: 509 | Зарегистр. 19-08-2011 | Отправлено: 22:01 05-01-2019 | Исправлено: mikhaelkh, 22:15 05-01-2019
   

На первую страницук этому сообщениюк последнему сообщению

Компьютерный форум Ru.Board » Компьютеры » Программы » Блокировка рекламы в браузере (часть 3)
gyra (29-01-2019 23:26): Блокировка рекламы в браузере (часть 4)


Реклама на форуме Ru.Board.

Powered by Ikonboard "v2.1.7b" © 2000 Ikonboard.com
Modified by Ru.B0ard
© Ru.B0ard 2000-2024

BitCoin: 1NGG1chHtUvrtEqjeerQCKDMUi6S6CG4iC

Рейтинг.ru