Hey,

On Ter, 6 Mai, 2014 at 7:54 , Carlos Garcia Campos <cgar...@igalia.com> wrote:
My first idea was to keep them static in the source code, similar to
plugin quirks, but I agree that information might become obsolete soon.

I wrote something exactly like this a while ago, specifically so that Google would stop misbehaving, so we did have something like this, but I think it was never ported to WebKit2

There's a FrameLoaderClient method that is called to get the User-Agent and is given a URL, so hooking there and having a list of sites and User-Agents would be enough; we could make that list be a text (or json) file that would make it easier to update, mapping domain patterns to user agents.

That's what we used to do:

http://trac.webkit.org/browser/releases/WebKitGTK/webkit-2.4.1/Source/WebKit/gtk/webkit/webkitwebsettings.cpp#L1647

Gustavo Noronha
_______________________________________________
webkit-gtk mailing list
webkit-gtk@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-gtk

Reply via email to