diff --git a/README b/README deleted file mode 100644 index e69de29..0000000 diff --git a/README.md b/README.md new file mode 100644 index 0000000..50bc1c2 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +This is the ReMo Companion add-on. You can build it with the Add-ons SDK, +available for download at: +https://addons.mozilla.org/en-US/developers/builder diff --git a/data/Remo16.png b/data/Remo16.png new file mode 100644 index 0000000..1b7f03b Binary files /dev/null and b/data/Remo16.png differ diff --git a/data/Remo32.png b/data/Remo32.png new file mode 100644 index 0000000..ba76d1e Binary files /dev/null and b/data/Remo32.png differ diff --git a/data/Remo64.png b/data/Remo64.png new file mode 100644 index 0000000..50c9398 Binary files /dev/null and b/data/Remo64.png differ diff --git a/data/remo.html b/data/remo.html new file mode 100644 index 0000000..c382fe2 --- /dev/null +++ b/data/remo.html @@ -0,0 +1,58 @@ + + + + ReMo Companion + + + + + + + + + +
+
+ +

About this Add-on

+ +

The ReMo Companion provides easy access to tools and documentation for Mozilla Reps.

+ +

The Mozilla Reps program provides a simple framework and specific tools to help volunteer Mozillians become official representatives of Mozilla in their region. + Anyone who is passionate and knowledgeable about Mozilla and who is ready to dive deeper into the project can sign-up to the program. The Mozilla Reps program + helps push responsibility and authority further outwards, to more Mozillians, making it much easier for volunteers organize and/or attend events, recruit and + mentor new contributors, and support their local communities better.

+ +
+ +
+ + + + + diff --git a/doc/main.md b/doc/main.md new file mode 100644 index 0000000..dc13e8d --- /dev/null +++ b/doc/main.md @@ -0,0 +1,3 @@ +The main module is a program that creates a widget. When a user clicks on +the widget, the program loads a page or page with content to access ReMo tools +and documentation. diff --git a/lib/main.js b/lib/main.js new file mode 100644 index 0000000..dbb61a9 --- /dev/null +++ b/lib/main.js @@ -0,0 +1,24 @@ +// This is an active module of the ReMo Add-on +exports.main = function() {}; + +// setup a widget for dispaying the result +var remowidget = require("widget"); + +// get the data directory +var data = require("self").data; + + +// define the widget and icon: +remowidget.Widget({ + id: "remo-icon", + label: "ReMo Companion", + contentURL: data.url('Remo16.png'), + panel: require("panel").Panel + ({ + width: 500, + height: 420, + contentURL: data.url('remo.html'), + }), + tooltip: "ReMo Companion", + anchor: "top" +}); diff --git a/package.json b/package.json new file mode 100644 index 0000000..0e63e7a --- /dev/null +++ b/package.json @@ -0,0 +1,13 @@ +{ + "license": "MPL 1.1/GPL 2.0/LGPL 2.1", + "name": "remo-companion", + "contributors": [ + "Your Name here" + ], + "author": "Brian King", + "description": "Tools for Mozilla Reps", + "version": "0.1", + "fullName": "ReMo Companion", + "id": "jid1-4QxcVDv2lBVyfQ", + "icon": "data/Remo32.png" +} diff --git a/test/test-main.js b/test/test-main.js new file mode 100644 index 0000000..98d630b --- /dev/null +++ b/test/test-main.js @@ -0,0 +1,32 @@ +const main = require("main"); + +exports.test_test_run = function(test) { + test.pass("Unit test running!"); +}; + +exports.test_id = function(test) { + test.assert(require("self").id.length > 0); +}; + +exports.test_url = function(test) { + require("request").Request({ + url: "http://www.mozilla.org/", + onComplete: function(response) { + test.assertEqual(response.statusText, "OK"); + test.done(); + } + }).get(); + test.waitUntilDone(20000); +}; + +exports.test_open_tab = function(test) { + const tabs = require("tabs"); + tabs.open({ + url: "http://www.mozilla.org/", + onReady: function(tab) { + test.assertEqual(tab.url, "http://www.mozilla.org/"); + test.done(); + } + }); + test.waitUntilDone(20000); +};