[or-cvs] r15463: Fix issues found with SpeedDial extension. Add new strings w (in torbutton/trunk/src: chrome/content chrome/locale/en-US components)
mikeperry at seul.org
mikeperry at seul.org
Wed Jun 25 18:43:54 UTC 2008
Author: mikeperry
Date: 2008-06-25 14:43:54 -0400 (Wed, 25 Jun 2008)
New Revision: 15463
Modified:
torbutton/trunk/src/chrome/content/torbutton.js
torbutton/trunk/src/chrome/locale/en-US/torbutton.dtd
torbutton/trunk/src/chrome/locale/en-US/torbutton.properties
torbutton/trunk/src/components/window-mapper.js
Log:
Fix issues found with SpeedDial extension. Add new strings we
may use in the future.
Modified: torbutton/trunk/src/chrome/content/torbutton.js
===================================================================
--- torbutton/trunk/src/chrome/content/torbutton.js 2008-06-25 18:30:58 UTC (rev 15462)
+++ torbutton/trunk/src/chrome/content/torbutton.js 2008-06-25 18:43:54 UTC (rev 15463)
@@ -1951,7 +1951,7 @@
&& !(subject.loadFlags & Components.interfaces.nsIChannel.LOAD_DOCUMENT_URI))) {
// FIXME: FF3 no longer calls the contet policy for favicons.
// This is the workaround. Fun fun fun.
- if(m_tb_ff3) {
+ if(m_tb_ff3 && subject.notificationCallbacks) {
try {
var wind = subject.notificationCallbacks.QueryInterface(
Components.interfaces.nsIInterfaceRequestor).getInterface(
@@ -2463,9 +2463,11 @@
DOMWindow = aProgress.DOMWindow;
} else {
try {
- DOMWindow = aRequest.notificationCallbacks.QueryInterface(
- Components.interfaces.nsIInterfaceRequestor).getInterface(
- Components.interfaces.nsIDOMWindow);
+ if(aRequest.notificationCallbacks) {
+ DOMWindow = aRequest.notificationCallbacks.QueryInterface(
+ Components.interfaces.nsIInterfaceRequestor).getInterface(
+ Components.interfaces.nsIDOMWindow);
+ }
} catch(e) { }
}
Modified: torbutton/trunk/src/chrome/locale/en-US/torbutton.dtd
===================================================================
--- torbutton/trunk/src/chrome/locale/en-US/torbutton.dtd 2008-06-25 18:30:58 UTC (rev 15462)
+++ torbutton/trunk/src/chrome/locale/en-US/torbutton.dtd 2008-06-25 18:43:54 UTC (rev 15463)
@@ -85,3 +85,4 @@
<!ENTITY torbutton.prefs.test_settings "Test Settings">
<!ENTITY torbutton.prefs.test_auto "Test my Tor settings after the first time I toggle on every Firefox start">
<!ENTITY torbutton.prefs.disable_livemarks "Disable livemarks updates during Tor usage">
+<!ENTITY torbutton.prefs.block_links "Disable links after Tor toggle (optional)">
Modified: torbutton/trunk/src/chrome/locale/en-US/torbutton.properties
===================================================================
--- torbutton/trunk/src/chrome/locale/en-US/torbutton.properties 2008-06-25 18:30:58 UTC (rev 15462)
+++ torbutton/trunk/src/chrome/locale/en-US/torbutton.properties 2008-06-25 18:43:54 UTC (rev 15463)
@@ -10,7 +10,7 @@
torbutton.popup.history.warning = Torbutton blocked changed-state history manipulation.\n\nSee history settings to allow.\n\n
torbutton.popup.plugin.warning = Torbutton blocked direct Tor load of plugin content.\n\nUse Save-As instead.\n\n
torbutton.popup.confirm_ca_certs = Torbutton Note: It appears you have no custom Certificate Authorities. Examining the Certificate Authority list is a slow operation and slows down Tor toggle. Would you like to disable the isolation of Certificate Authority certificates? (If you don't understand this, it is safe to click OK)
-torbutton.popup.ff3.warning = Warning!\n\nTorbutton on Firefox 3 is known to leak your timezone and livemark feeds during Tor usage. In addition, it has not been as extensively tested for Tor security and usability as Firefox 2.\n\nDo you wish to continue anyway?
+torbutton.popup.ff3.warning = Warning!\n\nTorbutton on Firefox 3 is known to leak your timezone, livemarks, and not properly restore cookies due to Firefox bugs. There may be other issues as well.\n\nDo you wish to continue anyway?
torbutton.popup.toggle.warning = You need to toggle Tor or restart for your settings to take effect.
torbutton.popup.test.success = Tor proxy test successful!
torbutton.popup.test.failure = Tor proxy test FAILED! Check your proxy and Privoxy settings.
Modified: torbutton/trunk/src/components/window-mapper.js
===================================================================
--- torbutton/trunk/src/components/window-mapper.js 2008-06-25 18:30:58 UTC (rev 15462)
+++ torbutton/trunk/src/components/window-mapper.js 2008-06-25 18:43:54 UTC (rev 15463)
@@ -130,12 +130,27 @@
}
}
- if(topContentWindow && topContentWindow.location)
- this.logger.log(5, "No browser found: "+topContentWindow.location);
- else
- this.logger.log(5, "No browser found!");
+ // FIXME: SpeedDial and other extensions can create their
+ // own "<browser>" tag elements. AFAICT, there is no way to enumerate
+ // these... Just punt and return the most recently used browser
+ try {
+ if(topContentWindow.name != "speedDialLoaderBrowser") {
+ if(topContentWindow && topContentWindow.location)
+ this.logger.log(5, "No browser found: "+topContentWindow.location);
+ else
+ this.logger.log(5, "No browser found: "+topContentWindow.name);
+ } else {
+ this.logger.log(3, "SpeedDial browser found: "+topContentWindow.name);
+ }
+ } catch(e) {
+ this.logger.log(5, "No browser found.");
+ }
- return null;
+ // Punt..
+ var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"].
+ getService(Components.interfaces.nsIWindowMediator);
+ var recentWindow = wm.getMostRecentWindow("navigator:browser");
+ return recentWindow ? recentWindow.getBrowser() : null;
}
}
More information about the tor-commits
mailing list