1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-11 01:22:10 +01:00

[Win] Use custom user-agent for facebook.

Fixes facebook chat.

See #867
This commit is contained in:
nowrep 2013-05-18 22:55:47 +02:00
parent ffc47909a8
commit 8172e19a3b

View File

@ -53,6 +53,13 @@ QString UserAgentManager::userAgentForUrl(const QUrl &url) const
{ {
const QString &host = url.host(); const QString &host = url.host();
#ifdef Q_OS_WIN
// Facebook chat is not working with default user-agent
if (host == QLatin1String("facebook.com")) {
return "Mozilla/5.0 (Windows XP) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.77 Safari/535.7";
}
#endif
if (m_usePerDomainUserAgent) { if (m_usePerDomainUserAgent) {
QHashIterator<QString, QString> i(m_userAgentsList); QHashIterator<QString, QString> i(m_userAgentsList);
while (i.hasNext()) { while (i.hasNext()) {