Skip to content

Commit

Permalink
Don't complain about UA spoofing if UA is same.
Browse files Browse the repository at this point in the history
  • Loading branch information
codebutler committed Oct 22, 2010
1 parent 4826aca commit eea723c
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions xpi/chrome/content/ff-sidebar.js
Expand Up @@ -33,7 +33,7 @@ function startup() {
.rootTreeItem
.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIDOMWindow);

reloadSession();
updateState();
}
Expand Down Expand Up @@ -172,9 +172,11 @@ function onResultDoubleClick () {

if (result.handler.spoofUserAgent) {
// FIXME!
var errors = document.getElementById('errors');
errors.appendNotification('User agent spoofing not yet implemented.');
return;
if (window.navigator.userAgent != result.firstPacket.userAgent) {
var errors = document.getElementById('errors');
errors.appendNotification('User agent spoofing not yet implemented.');
return;
}
}

var ios = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService);
Expand All @@ -188,7 +190,7 @@ function onResultDoubleClick () {
var cookieString = cookieName + '=' + cookieValue + ';domain=.' + cookieUri.host;
cookieSvc.setCookieString(cookieUri, null, cookieString, null);
}

mainWindow.gBrowser.selectedTab = mainWindow.gBrowser.addTab(result.siteUrl);
}
} catch (e) {
Expand Down

0 comments on commit eea723c

Please sign in to comment.