Youtube Ads Development Build

Everything about using Adblock Plus on Google Chrome
Post Reply
Silver

Youtube Ads Development Build

Post by Silver »

Hey,

in the newest development build i'm getting video ads in youtube again, that wasnt the case with the older build.
Wladimir Palant

Re: Youtube Ads Development Build

Post by Wladimir Palant »

"Newest development build" means which one exactly? 1.0.26.633 is the one where it should work.
Silver

Re: Youtube Ads Development Build

Post by Silver »

Oh, alright i still had the 1.0.26.632 apparently. I'm gonna update and see if it still happens.
fettzen

Re: Youtube Ads Development Build

Post by fettzen »

http://www.youtube.com/watch?v=cdonrcwLJPo

Hier kommt noch Werbung vor dem Clip. Version: 1.0.26.633
Wladimir Palant

Re: Youtube Ads Development Build

Post by Wladimir Palant »

Kann ich leider nicht nachvollziehen - bei mir kommt die Werbung nur, wenn ich "Block ads inside YouTube videos" abschalte.
fettzen

Re: Youtube Ads Development Build

Post by fettzen »

Könnte es sein das wenn man einmal die Werbung gesehen hat das für eine bestimmte Zeit sie nicht mehr kommt. Hatte diese Link bekommen in Google Chrome angemacht und sofort kam Werbung könnte ja auch was mit Chrome selbst Zutun haben das ich einfach zu schnell war und die Erweiterung hier nicht hinter herkam?
Wladimir Palant

Re: Youtube Ads Development Build

Post by Wladimir Palant »

fettzen wrote:Könnte es sein das wenn man einmal die Werbung gesehen hat das für eine bestimmte Zeit sie nicht mehr kommt.
Ja, wenn man die Cookies nicht löscht. Deswegen habe ich auch die Option "Block ads inside YouTube videos" abgeschaltet, um sicherzugehen, dass dann tatsächlich Werbung kommt. Und mit dieser Option kam sie wieder nicht.

Eigentlich haben wir das jetzt so gemacht, dass zumindest auf YouTube das Timing keine Probleme mehr verursachen sollte. Hast Du vielleicht irgendwelche Fehlermeldungen auf dieser Seite (Strg-Shift-J öffnet die JavaScript Console, wo diese Meldungen sichtbar sind)?
fettzen

Re: Youtube Ads Development Build

Post by fettzen »

Bis jetzt hatte ich keine Fehlermeldung werde es aber weiterhin beobachten. Wird Heute ein neue Version erscheinen? Der Release Candidate läuft ja bis jetzt vollkommen Fehlerfrei und Werbung wird auch ordentlich blockiert.
Wladimir Palant

Re: Youtube Ads Development Build

Post by Wladimir Palant »

Ja, ich will die neue Version heute herausbringen.
fettzen

Re: Youtube Ads Development Build

Post by fettzen »

Wann können wir damit rechnen?
Wladimir Palant

Re: Youtube Ads Development Build

Post by Wladimir Palant »

Vor 30 Minuten.
Klingon

Re: DOM exception 8

Post by Klingon »

There's a way to force ABP to perform an illegal operation. Give the player a new sibling, then later remove it so that ABP's reference to it becomes null.

Allow the code below to run first in a separate process:

Code: Select all

document.addEventListener("beforeload", 
    function beforeload(beforeloadevent) {
        var player = beforeloadevent.target;
        // The Youtube player.
        if (/^(embed|object)$/.test(player.localName)) {
            var sibling = document.createElement("div");
            player.insertAdjacentElement("afterEnd", sibling);
            // ABP is referencing this new sibling.
            // Let's remove it and see what happens...
            player.addEventListener("DOMNodeRemovedFromDocument", 
                function(mutationevent) {
                    if (mutationevent.target === player) {
                        sibling.parentNode.removeChild(sibling);
                    }
                }, false);
        }
    }, true);
A possible solution would be to create and use your own reference element:
http://pastebin.com/diff.php?i=hTaK2wUA
Wladimir Palant

Re: Youtube Ads Development Build

Post by Wladimir Palant »

Chrome extensions are generally by no means safe from manipulation - a website can usually make them error out pretty easily. There is no way to prevent it, if youtube.com turned malicious it could remove your new reference node as well. The result of the effort - a JavaScript exception and no player. We will have to take the risk, it's not like there is much of a choice. Btw, if YouTube really wanted to lock us out it could easily do so - Chrome doesn't really allow blocking in-video ads.
Klingon

Re: Youtube Ads Development Build

Post by Klingon »

I understand. I should point out that other extension developers may wish to use this technique, not with the intent of breaking ABP functionality, but simply to insert their own content that will react to mutation events. The method I have proposed adds a layer of safety by giving ABP its own reference node, which helps to avoid accidents. I hope you'll consider using it.
Wladimir Palant

Re: Youtube Ads Development Build

Post by Wladimir Palant »

I'll consider using it when I see issues :)
I really don't like maintaining unnecessary code.
Post Reply