Skip to content

Commit

Permalink
Make some final fixes to the addon.
Browse files Browse the repository at this point in the history
  • Loading branch information
bwinton committed Aug 21, 2012
1 parent c8e88b3 commit fca6d77
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions addon/lib/main.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ case 'WINNT':
OS = 'windows'; OS = 'windows';
break; break;
case 'Darwin': case 'Darwin':
OS = 'mac' OS = 'mac';
break; break;
} }
const customUrl = encodeURI(prefs.prototypeUrl.replace('%OS%', OS)); const customUrl = encodeURI(prefs.prototypeUrl.replace('%OS%', OS));


var widget = widgets.Widget({ var widget = widgets.Widget({
id: "mozilla-link", id: "mozilla-link",
label: "Mozilla website", label: "Mozilla website",
contentURL: "http://people.mozilla.com/~bwinton/australis-customization/images-win7/toolbarButton-customize.png", contentURL: "http://people.mozilla.com/~bwinton/australis/customization/mac/images/toolbarButton-menu.png",
onClick: function() { onClick: function() {
// Remove the location bar from the page. // Remove the location bar from the page.
var whitelist = customUrl.toLowerCase(); var whitelist = customUrl.toLowerCase();
Expand All @@ -39,6 +39,6 @@ var aboutHomeSearch = pageMod.PageMod({
contentScriptWhen: 'ready', contentScriptWhen: 'ready',
contentScript: 'document.addEventListener("tpemit", function(e) {self.port.emit("tp", e); return true;});', contentScript: 'document.addEventListener("tpemit", function(e) {self.port.emit("tp", e); return true;});',
onAttach: function(worker) { onAttach: function(worker) {
worker.port.on('tp', function(data) {console.log(data)}); worker.port.on('tp', function(data) {console.log(data);});
} }
}); });
16 changes: 8 additions & 8 deletions addon/package.json
Original file line number Original file line Diff line number Diff line change
@@ -1,16 +1,16 @@
{ {
"name": "australis-customization", "name": "australis-customization",
"license": "MPL 2.0", "license": "MPL 2.0",
"author": "", "author": "Blake Winton <bwinton@mozilla.com>",
"version": "0.5", "version": "0.5",
"fullName": "australis-customization", "fullName": "australis-customization",
"id": "jid1-JP21ittUYJBuSw", "id": "jid1-JP21ittUYJBuSw",
"description": "a basic add-on", "description": "a basic add-on",
"preferences": [{ "preferences": [{
"name": "prototypeUrl", "name": "prototypeUrl",
"title": "The Prototype Url.", "title": "The Prototype Url.",
"description": "The url to the prototype, duh.", "description": "The url to the prototype. %OS% will be replaced by the OS name.",
"type": "string", "type": "string",
"value": "http://people.mozilla.com/~bwinton/australis/customization/%OS%/" "value": "http://people.mozilla.com/~bwinton/australis/customization/mac/"
}] }]
} }

0 comments on commit fca6d77

Please sign in to comment.