Page 1 of 1

Youtube Ads Development Build

Posted: Fri Feb 25, 2011 4:34 pm
by Silver
Hey,

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

Re: Youtube Ads Development Build

Posted: Fri Feb 25, 2011 6:28 pm
by Wladimir Palant
"Newest development build" means which one exactly? 1.0.26.633 is the one where it should work.

Re: Youtube Ads Development Build

Posted: Fri Feb 25, 2011 7:49 pm
by Silver
Oh, alright i still had the 1.0.26.632 apparently. I'm gonna update and see if it still happens.

Re: Youtube Ads Development Build

Posted: Mon Feb 28, 2011 8:25 am
by fettzen
http://www.youtube.com/watch?v=cdonrcwLJPo

Hier kommt noch Werbung vor dem Clip. Version: 1.0.26.633

Re: Youtube Ads Development Build

Posted: Mon Feb 28, 2011 8:39 am
by Wladimir Palant
Kann ich leider nicht nachvollziehen - bei mir kommt die Werbung nur, wenn ich "Block ads inside YouTube videos" abschalte.

Re: Youtube Ads Development Build

Posted: Mon Feb 28, 2011 8:52 am
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?

Re: Youtube Ads Development Build

Posted: Mon Feb 28, 2011 9:03 am
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)?

Re: Youtube Ads Development Build

Posted: Mon Feb 28, 2011 11:17 am
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.

Re: Youtube Ads Development Build

Posted: Mon Feb 28, 2011 11:34 am
by Wladimir Palant
Ja, ich will die neue Version heute herausbringen.

Re: Youtube Ads Development Build

Posted: Mon Feb 28, 2011 3:39 pm
by fettzen
Wann können wir damit rechnen?

Re: Youtube Ads Development Build

Posted: Mon Feb 28, 2011 4:30 pm
by Wladimir Palant
Vor 30 Minuten.

Re: DOM exception 8

Posted: Wed Mar 02, 2011 10:13 am
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

Re: Youtube Ads Development Build

Posted: Wed Mar 02, 2011 10:20 am
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.

Re: Youtube Ads Development Build

Posted: Thu Mar 03, 2011 3:05 am
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.

Re: Youtube Ads Development Build

Posted: Thu Mar 03, 2011 8:41 am
by Wladimir Palant
I'll consider using it when I see issues :)
I really don't like maintaining unnecessary code.