diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/bootstrap.js | 17 | ||||
-rw-r--r-- | src/chrome.manifest | 5 | ||||
-rw-r--r-- | src/chrome/content/options.xul | 2 | ||||
-rw-r--r-- | src/chrome/skin/icon.png | bin | 0 -> 533 bytes | |||
-rw-r--r-- | src/chrome/skin/icon64.png | bin | 0 -> 751 bytes | |||
-rw-r--r-- | src/defaults/preferences/preferences.js | 1 | ||||
-rw-r--r-- | src/install.rdf | 2 |
7 files changed, 16 insertions, 11 deletions
diff --git a/src/bootstrap.js b/src/bootstrap.js index 2625c92..b01697f 100644 --- a/src/bootstrap.js +++ b/src/bootstrap.js @@ -103,12 +103,13 @@ var WindowListener = { } window.addEventListener("load", onWindowLoad); }, - onCloseWindow: function(xulWindow) {}, - onWindowTitleChange: function(xulWindow, newTitle) {} }; var TrustedReparser = { observe: function () { + if (!EIB.prefs.prefHasUserValue("trusted")) { + EIB.prefs.setCharPref("trusted", "[]"); + } EIB.trusted = JSON.parse(EIB.prefs.getCharPref("trusted")); } }; @@ -118,7 +119,7 @@ function startup(data, reason) { EIB.prefs = Services.prefs.getBranch("extensions.eib."); EIB.prefs.addObserver("trusted", TrustedReparser, false); - reparseTrusted(); + TrustedReparser.observe(); forEachOpenWindow(loadIntoWindow); Services.wm.addListener(WindowListener); @@ -154,10 +155,12 @@ function injectCCPEVE(e) { if (checkTrusted(window.location.href)) { var CCPEVE = Cu.createObjectIn(window, {defineAs: "CCPEVE"}); ["openEveMail", "showInfo", "showPreview", "showRouteTo", "showMap", "showFitting", "showContract", "showMarketDetails", "setDestination", "addWaypoint", "joinChannel", "joinMailingList", "createContract", "buyType", "findInContracts", "addToMarketQuickBar", "addContact", "removeContact", "addCorpContact", "removeCorpContact", "block", "addBounty", "inviteToFleet", "startConversation", "showContracts", "showOnMap", "editMember", "awardDecoration", "sendMail", "showContents", "bookmark"].forEach(function (n) { - Cu.exportFunction(function () { - EIB.pending.push('CCPEVE.' + n + '(' + Array.prototype.join.call(arguments, ',') + ');'); - return null; - }, CCPEVE, {defineAs: n}); + Object.defineProperty(CCPEVE, n, { + value: Cu.exportFunction(function () { + EIB.pending.push('CCPEVE.' + n + '(' + Array.prototype.join.call(arguments, ',') + ');'); + return null; + }, CCPEVE) + }); }); } } diff --git a/src/chrome.manifest b/src/chrome.manifest index 87c823b..1983e73 100644 --- a/src/chrome.manifest +++ b/src/chrome.manifest @@ -1,2 +1,3 @@ -content eib chrome/content/ -locale eib en chrome/locale/en/ +content eib chrome/content/ +locale eib en chrome/locale/en/ +skin eib classic/1.0 chrome/skin/ diff --git a/src/chrome/content/options.xul b/src/chrome/content/options.xul index 29543ba..5f1c6f3 100644 --- a/src/chrome/content/options.xul +++ b/src/chrome/content/options.xul @@ -3,5 +3,5 @@ <!DOCTYPE options SYSTEM "chrome://eib/locale/options.dtd"> <vbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> - <setting type="string" pref="extensions.eib.trusted" title="&eib.options.trusted" desc="&eib.options.trusted" /> + <setting type="string" pref="extensions.eib.trusted" title="&eib.options.trusted;" desc="&eib.options.trusted;" /> </vbox> diff --git a/src/chrome/skin/icon.png b/src/chrome/skin/icon.png Binary files differnew file mode 100644 index 0000000..7acfcf1 --- /dev/null +++ b/src/chrome/skin/icon.png diff --git a/src/chrome/skin/icon64.png b/src/chrome/skin/icon64.png Binary files differnew file mode 100644 index 0000000..e2f2ff4 --- /dev/null +++ b/src/chrome/skin/icon64.png diff --git a/src/defaults/preferences/preferences.js b/src/defaults/preferences/preferences.js deleted file mode 100644 index baa73a8..0000000 --- a/src/defaults/preferences/preferences.js +++ /dev/null @@ -1 +0,0 @@ -pref("extensions.eib.trusted", "[]"); diff --git a/src/install.rdf b/src/install.rdf index 9295bbd..eb79f3c 100644 --- a/src/install.rdf +++ b/src/install.rdf @@ -13,6 +13,8 @@ <em:bootstrap>true</em:bootstrap> <em:optionsURL>chrome://eib/content/options.xul</em:optionsURL> <em:optionsType>2</em:optionsType> + <em:iconURL>chrome://eib/skin/icon.png</em:iconURL> + <em:icon64URL>chrome://eib/skin/icon64.png</em:icon64URL> <!-- Mozilla Firefox --> <em:targetApplication> |