Skip to content

Commit

Permalink
Merge branch 'master' of git://github.com/codebutler/firesheep
Browse files Browse the repository at this point in the history
  • Loading branch information
craSH committed Oct 23, 2010
2 parents b133a7f + 4f0d66e commit cdd131a
Show file tree
Hide file tree
Showing 11 changed files with 81 additions and 54 deletions.
6 changes: 3 additions & 3 deletions xpi/chrome.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ content firesheep chrome/content/
skin firesheep classic/1.0 chrome/skin/
locale firesheep en-US chrome/locale/en-US/


overlay chrome://browser/content/browser.xul chrome://firesheep/content/ff-overlay.xul
style chrome://global/content/customizeToolbar.xul chrome://firesheep/skin/overlay.css
overlay chrome://browser/content/browser.xul chrome://firesheep/content/ff-overlay.xul
style chrome://firesheep/content/ff-sidebar.xul chrome://firesheep/skin/sidebar-osx.css OS=Darwin
style chrome://firesheep/content/preferences/prefsWindow.xul chrome://firesheep/skin/preferences-osx.css OS=Darwin

resource firesheep modules/
12 changes: 11 additions & 1 deletion xpi/chrome/content/ff-overlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,19 @@

var FiresheepUI = {
onLoad: function() {
// initialization code
if (this.initialized)
return;

this.initialized = true;
this.strings = document.getElementById("firesheep-strings");

var prefs = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefBranch);
if (prefs.getBoolPref('firesheep.first_run')) {
toggleSidebar('viewSidebar_firesheep', true);
var welcomeUrl = "http://codebutler.github.com/firesheep/welcome.html";
window.gBrowser.selectedTab = window.gBrowser.addTab(welcomeUrl);
prefs.setBoolPref('firesheep.first_run', false);
}
},

toggleSidebar: function (e) {
Expand Down
2 changes: 1 addition & 1 deletion xpi/chrome/content/ff-overlay.xul
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
</menupopup>

<keyset id="mainKeyset">
<key id="key_openSidebar_firesheep" command="viewSidebar_firesheep" key="s" modifiers="meta shift control" />
<key id="key_openSidebar_firesheep" command="viewSidebar_firesheep" key="s" modifiers="shift control" />
</keyset>

<broadcasterset id="mainBroadcasterSet">
Expand Down
12 changes: 7 additions & 5 deletions xpi/chrome/content/ff-sidebar.js
Original file line number Diff line number Diff line change
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
1 change: 1 addition & 0 deletions xpi/chrome/content/preferences/websiteEditor.xul
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="chrome://firesheep/skin/preferences.css"?>

<!--
Expand Down
2 changes: 1 addition & 1 deletion xpi/chrome/content/preferences/websitesPane.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ function editScript () {
try {
var item = document.getElementById("scriptsList").selectedItem;
if (item)
window.openDialog('websiteEditor.xul', null, 'modal', item.value, item.isUser);
window.openDialog('websiteEditor.xul', null, 'modal,centerscreen', item.value, item.isUser);
} catch (e) {
alert(e);
}
Expand Down
3 changes: 3 additions & 0 deletions xpi/chrome/skin/preferences-osx.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
prefwindow {
height: auto !important;
}
17 changes: 4 additions & 13 deletions xpi/chrome/skin/preferences.css
Original file line number Diff line number Diff line change
@@ -1,18 +1,9 @@
caption {
font-weight: bold;
prefwindow {
height: 350px;
}

#websitesPane {
/* padding: 0; */
}

#websitesPane listbox {
/*
margin: 0;
-moz-appearance: none;
border: 0;
background: #DEE4EA;
*/
caption {
font-weight: bold;
}

#websitesPane splitter {
Expand Down
45 changes: 45 additions & 0 deletions xpi/chrome/skin/sidebar-osx.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
firesheepSidebar {
-moz-appearance: none;
background: transparent;
}

#firesheepSidebar #toolbar {
background: -moz-linear-gradient(top, #EDEDED, #D8D8D8);
border-bottom: 1px solid #B8B8B8;
}

#firesheepSidebar #toolbar button {
-moz-appearance: none;
border: 1px solid #7F7F7F;
-moz-border-radius: 10px;
background: -moz-linear-gradient(top, #FFF, #BBB);
min-width: 0px;
min-height: 0px;
-moz-padding-start: 5px;
-moz-padding-end: 5px;
margin: 0;
padding: 2px 0;
}

#firesheepSidebar #toolbar button:active {
background: -moz-linear-gradient(top, #BBB, #FFF);
}

#firesheepSidebar richlistbox {
background: transparent;
}

#bottombar {
background: white url(chrome://firesheep/skin/bottombar_bg.png) repeat-x;
border-top: 0 !important;
}

#bottombar button {
}

#splitterHandle {
background: url(chrome://firesheep/skin/bottombar_handle.png) no-repeat;
min-width: 15px;
max-width: 15px;
display: block !important;
}
34 changes: 4 additions & 30 deletions xpi/chrome/skin/sidebar.css
Original file line number Diff line number Diff line change
@@ -1,35 +1,11 @@
#firesheepSidebar {
-moz-appearance: none;
background: transparent;
}

#firesheepSidebar #toolbar {
padding: 6px;
background: -moz-linear-gradient(top, #EDEDED, #D8D8D8);
border-bottom: 1px solid #B8B8B8;
border-bottom: 1px solid threedshadow;
}

#firesheepSidebar richlistbox {
margin: 0;
-moz-appearance: none;
background: transparent;
}

#firesheepSidebar #toolbar button {
-moz-appearance: none;
border: 1px solid #7F7F7F;
-moz-border-radius: 10px;
background: -moz-linear-gradient(top, #FFF, #BBB);
min-width: 0px;
min-height: 0px;
-moz-padding-start: 5px;
-moz-padding-end: 5px;
margin: 0;
padding: 2px 0;
}

#firesheepSidebar #toolbar button:active {
background: -moz-linear-gradient(top, #BBB, #FFF);
}

#detailsTree {
Expand All @@ -56,12 +32,12 @@ splitter {
}

#bottombar {
background: white url(chrome://firesheep/skin/bottombar_bg.png) repeat-x;
/* border-top: 1px solid #CACACA; */
border-top: 1px solid threedshadow;
}

#bottombar button {
-moz-appearance: none;
border: 0;
padding: 0;
margin: 0px 0 0 -1px !important;
min-height: 23px;
Expand Down Expand Up @@ -89,7 +65,5 @@ splitter {
}

#splitterHandle {
background: url(chrome://firesheep/skin/bottombar_handle.png) no-repeat;
min-width: 15px;
max-width: 15px;
display: none !important;
}
1 change: 1 addition & 0 deletions xpi/defaults/preferences/prefs.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

pref("firesheep.capture_interface", "");
pref("firesheep.capture_filter", "tcp port 80");
pref("firesheep.first_run", true);

// https://developer.mozilla.org/en/Localizing_extension_descriptions
pref("extensions.firesheep@codebutler.com.description", "chrome://firesheep/locale/overlay.properties");

0 comments on commit cdd131a

Please sign in to comment.