B
B
bro-dev2018-04-05 11:46:17
JavaScript
bro-dev, 2018-04-05 11:46:17

How to cut inline script using uBolock if the function is anonymous or missing?

spoiler
$(function(){

    var script = document.createElement('script');
    script.onerror = function(){
        script.onerror = null;
        document.body.removeChild(script);
        $("body").html("<div style=\"background-color: #fff; color: #333; width: 1000px; font-size: 18pt; margin: auto; position:relative; text-align: left; \"><img src=\"//st.overclockers.ru/images/hungry.png\" style=\"display:block; margin:auto\"><h1>Уважаемый посетитель!</h1><p>Мы определили, что вы используете систему удаления рекламы - Adblock, AdGuard или какую-то другую (в т.ч. правленный файл hosts).</p><p>Реклама - единственный источник дохода проекта Overclockers.ru, поэтому нам жизненно важно отображать рекламу на своих страницах.<p>Чтобы сайт жил и развивался, мы просим вас отключить блокировку рекламы.<p><br><br>- <a href=\"\">Хорошо, я отключил блокировку</a></p><!--br><p style=\"font-size:15pt\">- <a href=\"abp:subscribe?location=https://www.overclockers.ru/adblock.txt\">Добавить подписку для Adblock</a></p--><br><p style=\"font-size:15pt\">- <a href=\"https://forums.overclockers.ru/ucp.php?mode=login\">У меня есть подписка на конференцию без рекламы</a></p></div>");

    }
    script.src = "https://rotor.overclockers.ru/www/delivery/asyncjs.php";
    document.body.appendChild(script);

    $('#wrapheader').show();
});

Here is such a piece of code right in the body of the page in the script element, in addition to this, there is also the necessary code, so you only need to cut out this piece.
How do things like this cost?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question