Hey,<br><br>On Ter, 6 Mai, 2014 at 7:54 , Carlos Garcia Campos &lt;cgarcia@igalia.com&gt; wrote:<br>
<blockquote type="cite"><div class="plaintext" style="white-space: pre-wrap;">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.</div></blockquote><br><div>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</div><div><br></div><div>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.</div><div><br></div><div>That's what we used to do:</div><div><br></div><div><a href="http://trac.webkit.org/browser/releases/WebKitGTK/webkit-2.4.1/Source/WebKit/gtk/webkit/webkitwebsettings.cpp#L1647">http://trac.webkit.org/browser/releases/WebKitGTK/webkit-2.4.1/Source/WebKit/gtk/webkit/webkitwebsettings.cpp#L1647</a></div><div><br></div><div>Gustavo Noronha</div>