Uassets: twojogrodek.pl

Created on 31 Mar 2019  ·  33Comments  ·  Source: uBlockOrigin/uAssets

antiadblock
@mapx- @okiehsch
twojogrodek.pl

unable to reproduce

All 33 comments

@okiehsch @mapx- hello?

I can't reproduce, tried with Chromium and Firefox.

how to neutralize it?

<script type="text/javascript">
q.push(function() {
    var w = $(window),
        st = w.scrollTop(),
        ap = $('#actionsPanel'),
        ct = $('#content').find('.post'),
        to = Math.max(0, ap.offset().top + ap.height() - w.height()),
        to = to > 0 ? to + ((w.height() - ap.height()) / 2) : to;
    function actionPanelAffix() {
        var st = w.scrollTop(),
            nt = w.width() < 768 ? '' : Math.min(Math.max(0, st - to), Math.max(0, ct.height() - ap.height()));
            ap.css('top', nt);
    };
    actionPanelAffix();
    $(window).scroll(actionPanelAffix);
    $('#actionFBButton').click(function(e) {
        window.open('https://www.facebook.com/dialog/share?app_id=940293796152421&display=popup&href=https%3A%2F%2Ftwojogrodek.pl%2FKarczownik-w-ogrodzie-jak-sie-go-pozbyc%23sbfb&redirect_uri=https%3A%2F%2Ftwojogrodek.pl%2F%2Ffacebook_redirect.html', '', 'height=560,width=530');
        ga('send', 'event', 'artykuł', 'Facebook', '', 0, { nonInteraction: true });
    });

    $('#actionWAButton').click(function(e) {
        window.open('https://api.whatsapp.com/send?text=Zobacz+artyku%C5%82+Karczownik+w+ogrodzie+%E2%80%93+jak+si%C4%99+go+pozby%C4%87%3F+%28https%3A%2F%2Ftwojogrodek.pl%2FKarczownik-w-ogrodzie-jak-sie-go-pozbyc%23sbwa%29');
        ga('send', 'event', 'artykuł', 'WhatsApp', '', 0, { nonInteraction: true });ga('common.send', 'event', 'artykuł', 'WhatsApp', '', 0, { nonInteraction: true });
    });

    $('#actionPintButton').click(function(e) {
        window.open('https://www.pinterest.com/pin/create/button/?url=https%3A%2F%2Ftwojogrodek.pl%2FKarczownik-w-ogrodzie-jak-sie-go-pozbyc&media=https%3A%2F%2Fart2.tcdn.pl%2Fwd%2Fart%2F49%2Fz%2F2449-8324-XxrdlUn48e_big.jpg&description=', '', 'height=420,width=550');
        ga('send', 'event', 'artykuł', 'Pinterest', '', 0, { nonInteraction: true });
    });

    $('#actionCommentsButton').click(function(e) {
        $('#komentarze').scrollTo(300, 60);
        window.location.hash='#komentarze';
        ga('send', 'event', 'artykuł', 'komentarze', '', 0, { nonInteraction: true });
    });

    $('#actionMailButton').click(function(e) {
        window.location.href='mailto:?subject=Karczownik w ogrodzie – jak się go pozbyć?&body=Artykuł: https://twojogrodek.pl/Karczownik-w-ogrodzie-jak-sie-go-pozbyc#sbem';
        ga('send', 'event', 'artykuł', 'e-mail', '', 0, { nonInteraction: true });
    });

    $('.widget.podobne a').click(function(e) {
        ga('send', 'event', 'podobne', 'sidebar', '', 0, { nonInteraction: true });
    });


    $('#actionPrintButton').click(function(e) {
        if (window.location.hash != "" && !!(window.history && window.history.pushState))
            window.history.pushState('', document.title, window.location.pathname + window.location.search);
        window.print();
        ga('send', 'event', 'artykuł', 'drukuj', '', 0, { nonInteraction: true });
    });
});

q.push(function() {
    // dynads
    var cz = 302,
        thb = 1500,
        cs = 0,
        slots = tooba.isMobile ?
                [['/17296526/twoj-ogrodek-grupa/twojogrodek-au01', [300, 250]],
                 ['/17296526/twoj-ogrodek-grupa/twojogrodek-au02', [300, 250]],
                 ['/17296526/twoj-ogrodek-grupa/twojogrodek-au03', [300, 250]],
                 ['/17296526/twoj-ogrodek-grupa/twojogrodek-au04', [300, 250]],
                 ['/17296526/twoj-ogrodek-grupa/twojogrodek-au05', [300, 250]]] :
                     [['/17296526/twoj-ogrodek-grupa/twojogrodek-au06', [728, 90]],
                      ['/17296526/twoj-ogrodek-grupa/twojogrodek-au07', [728, 90]],
                      ['/17296526/twoj-ogrodek-grupa/twojogrodek-au08', [728, 90]],
                      ['/17296526/twoj-ogrodek-grupa/twojogrodek-au09', [728, 90]],
                      ['/17296526/twoj-ogrodek-grupa/twojogrodek-au10', [728, 90]]];

    $('.post-content > *').each(function(idx, el) {
        var $el = $(el);
        cz += $el.text().trim().length;
        if (cz >= thb) {
            if (cs >= slots.length)
                return;
            if (!tooba.isMobile && $el.next().length == 0)
                return;
            var slot = slots[cs],
                slotId = 'div-gpt-content-ad-' + cs;
            $('<div></div>', {id: slotId, class: 'ad-slot'}).insertAfter($el);
            googletag.cmd.push(function() {
                googletag.defineSlot(slot[0], slot[1], slotId).addService(googletag.pubads());
                googletag.display(slotId);
            });
            cz = 0;
            cs++;
        }
    });
});

(function() {
    var bait = document.createElement('div');
    bait.setAttribute('class', 'pub_300x250 pub_300x250m text-ad textAd text-ads text-ad-links');
    bait.setAttribute('style', 'width: 1px !important; height: 1px !important; position: absolute !important; left: -10000px !important; top: -1000px !important;');
    var baitEl = window.document.body.appendChild(bait);
    var baitTemp = window.getComputedStyle(baitEl, null);
    if (baitTemp && (baitTemp.getPropertyValue('display') === 'none' || baitTemp.getPropertyValue('visibility') === 'hidden')) {
        q.push(function() {

            $('body').css('overflow', 'hidden');
            $('<div class="adblock-message"><div class="adblock-message-content"><div class="left">' +
                    '<div class="heading">Chcesz czytać dalej? Odblokuj wyświetlanie reklam.</div>' +
                    '<div>To dzięki reklamom możemy dostarczać Tobie wysokiej jakości artykuły.</div>' +
                    '<div class="emp">Wyłącz AdBlocka.</div>' +
                    '<div>Nie emitujemy uciążliwych reklam.</div></div><div class="right">' +
                    '<div><i class="adblock-img img-1"></i> 1. Wyłącz AdBlocka</div><div><i class="adblock-img img-2"></i> 2. Odśwież stronę</div>' +
                    '</div>' +
                '</div></div>').appendTo($('.post-content'));

            ga('send', 'event', 'adblock', 'adblock', '', 0, { nonInteraction: true });

        });
    }
    window.document.body.removeChild(baitEl);
})();


q.push(function() {
    var artykulScrolled = false, artykulScrolled50 = false;
    function onScroll() {
        if (artykulScrolled && artykulScrolled50)
            return;

        var rect = $('.post-wrap')[0].getBoundingClientRect();
        var half = rect.bottom - ((rect.bottom - rect.top) / 2);
        var wh = $(window).height();

        if (!artykulScrolled50 && half <= wh) {
            artykulScrolled50 = true;
            ga('send', 'event', 'artykuł', 'przewinięcie', 'połowa', 0, { nonInteraction: true });
        }

        if (!artykulScrolled && rect.bottom <= wh) {
            artykulScrolled = true;
            ga('send', 'event', 'artykuł', 'przewinięcie', '', 0, { nonInteraction: true });
        }

        if (artykulScrolled && artykulScrolled50)
            $(window).off('scroll resize', onScroll);
    }
    $(window).on('scroll resize', onScroll);
});
</script>

@okiehsch Jesus, help me please

Does it work if you disable cosmetic filtering for the site?

@okiehsch ~does not work scroll~

does not work at all.

I cannot reproduce either (FF/chrome/opera)
@bogachenko are you using some custom filter for this site ? Did you test the page with the polish lists enabled ?

are you using some custom filter for this site

no all default

Did you test the page with the polish lists enabled ?

of course

@mapx- u know how to get around this? https://github.com/uBlockOrigin/uAssets/issues/5252#issuecomment-478329043

if
twojogrodek.pl##.adblock-message
that
does not work scroll

I don't see that script anywhere on the page on my end, is it inline or part of a 1st or 3rd party script.

inline

I can lay out the saved version of html (or the code) here
But there is nothing interesting

if twojogrodek.pl##.adblock-message that does not work scroll

Does scrolling work if you add
twojogrodek.pl##body:style(overflow: auto !important;)

Lol. its work/ thanks

@krystian3w @MajkiIT

Also I cannot reporduce.

I cut only social and cookies bar.

##.dialog-fixed.cookie-rodo-dialog.dialog

###actionWAButton

@krystian3w :dancer:
68747470733a2f2f7265706f7274732d696d672e616467756172642e636f6d2f394f35664433462e706e67

@bogachenko try this:

@@||googletagservices.com/tag/js/gpt.js

AdNuseam allow this script.

@bogachenko try this:

@@||googletagservices.com/tag/js/gpt.js

AdNuseam allow this script.

already decided -> https://github.com/uBlockOrigin/uAssets/issues/5252#issuecomment-478330062


and yeah, its not work

already decided

so try put this into PR on:

https://github.com/olegwukr/polish-privacy-filters/

PR of Poles users are rejected so that their companies will not he sued in court....

already decided

so try put this into PR on:

https://github.com/olegwukr/polish-privacy-filters/

PR of Poles user are rejected so that their companies will not he sued in court....

I tried it too https://github.com/uBlockOrigin/uAssets/issues/5252#issuecomment-478329650

twojogrodek.pl#$#.pub_300x250.pub_300x250m.pub_728x90.text-ad.textAd.text_ad.text_ads.text-ads.text-ad-links {display:block!important;}

nope

twojogrodek.pl#$#.pub_300x250.pub_300x250m.text-ad.textAd.text-ads.text-ad-links{display:block!important;}

twojogrodek.pl#@#.pub_300x250
twojogrodek.pl#@#.pub_300x250m
twojogrodek.pl#@#.text-ad
twojogrodek.pl#@#.textAd
twojogrodek.pl#@#.text-ads
twojogrodek.pl#@#.text-ad-links

1 working

2 nope

"twojogrodek.pl#@#.textAd" - maybe copied old without dot "." 😭

nope. ahahahah

"twojogrodek.pl#@#.textAd" - maybe copied old without dot "." 😭

nope. ahahahah

So You have cosmetic filter combined on attribs:

https://www.w3schools.com/CSS/css_attribute_selectors.asp

eg.

##div[class*=Ad]

Nope I cannot add, my PR should rejected to protect me before sued in court from Tooba.pl Mikołaj Bykowski Przemysław Klein s.c. company side.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  ·  3Comments

patrickdrd picture patrickdrd  ·  3Comments

patrickdrd picture patrickdrd  ·  4Comments

KiLL4FuNK picture KiLL4FuNK  ·  4Comments

melnation-com picture melnation-com  ·  4Comments