gcfavorites / executejs

Automatically exported from code.google.com/p/executejs
0 stars 0 forks source link

Please add a support for Thunderbird #6

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
It would be better if this addon works on Thunderbird.

Original issue reported on code.google.com by hasi1...@gmail.com on 2 Feb 2009 at 1:52

GoogleCodeExporter commented 9 years ago
Here is a quick fix for Execute JS 0.2.4 and Thunderbird 3.1.

File: install.rdf
Note: Typo/Bump

- <description>Excute JS</description>
+ <description>Execute JS</description>

- <maxVersion>3.1a1pre</maxVersion>
+ <maxVersion>3.1.*</maxVersion>

File: chrome\content\executejs\executeJSTBOverlay.xul
Error: EJS_openCommandWin is not defined

- oncommand="EJS_openCommandWin();"
+ oncommand="executejs.EJS_openCommandWin();"

File: chrome\content\executejs\prefs.xul
Message: No chrome package registered for chrome://browser/skin/browser.css

- <?xml-stylesheet href="chrome://browser/skin/"?>
+ <?xml-stylesheet href="chrome://global/skin/"?>

File: chrome\content\common\common_bindings.css
Warning: Selector expected. Ruleset ignored due to bad selector

- // why won't this work?? DOM inspector claims that the background 
- // color is (255,255,255) but it isn't!! argghh!
- //textbox.keyinputbox {background-color:-moz-field !important; }

+ /* why won't this work?? DOM inspector claims that the background 
+    color is (255,255,255) but it isn't!! argghh!
+ textbox.keyinputbox {background-color:-moz-field !important; } */

File: chrome\content\executejs\executeJS.js
Error: browser.addTab is not a function

- function EJS_openHelp(event) {
-   var browser = window.opener.getBrowser();
-   browser.selectedTab = 
browser.addTab("http://www.mouseless.de/index.php?/content/view/18/31/");
-   window.opener.focus();
- }

+ function EJS_openHelp(event){
+   var url = "http://www.mouseless.de/index.php?/content/view/18/31/";
+   try {
+     var browser = window.opener.getBrowser();
+     browser.selectedTab = browser.addTab(url);
+     window.opener.focus();
+   } catch (err) {
+     var eps = 
Components.classes["@mozilla.org/uriloader/external-protocol-service;1"].
+       getService(Components.interfaces.nsIExternalProtocolService);
+     var ios = Components.classes["@mozilla.org/network/io-service;1"].
+       getService(Components.interfaces.nsIIOService);
+     eps.loadURI(ios.newURI(url, null, null));
+   }
+ }

Original comment by prajata...@gmail.com on 17 Mar 2011 at 5:37

GoogleCodeExporter commented 9 years ago
Even though its listed on Thunderbird extension site, its not working on 
Thunderbird 27 (9/26 nightly). It has the following  error (that i looks like 
the above patch fixes?).
Error: ReferenceError: EJS_openCommandWin is not defined
Source file: chrome://messenger/content/messenger.xul
Line: 1

Original comment by d...@ubiqsoft.com on 28 Sep 2013 at 9:39