Hi Uli,

I support your righteous cause ;-)

This did the trick for me:

    webview.init_funcs.youtube_appender = function (view, w)
        view:add_signal("navigation-request", function (v, uri)
            if string.match(uri, "youtube%.com/watch%?v=") and not 
string.match(uri, "&html5=1") then
                v.uri = uri .. "&html5=1"
                return false
            end
        end)
    end

But here's a caveat:
1.  Sometimes this dumps a bunch of warnings (not sure why, seems harmless, 
though)
2.  Be careful with this, it's easy to create infinite loops of signal calls 
with this technique, which will land you in a segfault

Otherwise,
Cheers!

On Thu, Nov 24, 2011 at 08:06:03PM +0100, Uli Armbruster wrote:
> Hi guys
> 
> I'd like to occupy flash as much as possible. In fact, I've been trying to 
> achieve that for quite some time. Thanks to html5 this is becoming easier and 
> easier.
> 
> Youtube requires either activated cookies or an additional &html5=1 in the 
> url. Since I also want to avoid cookies (and active javascript) whenever 
> possible, I'd love to have my browser always adding &html5=1 to the url 
> whenever I'm on youtube.
> 
> Is there a way to hack this possibility into luakit?
> 
> My first thought was using a userscript, which luakit can handle quite nicely 
> as we know. But I can't find one which provides this functionality.
> 
> Anybody with an idea out there? :)

> _______________________________________________
> luakit-dev mailing list
> luakit-dev@lists.luakit.org
> http://lists.luakit.org/mailman/listinfo/luakit-dev
> 
_______________________________________________
luakit-dev mailing list
luakit-dev@lists.luakit.org
http://lists.luakit.org/mailman/listinfo/luakit-dev

Reply via email to