Skip to content

Commit

Permalink
First pass, shell of add-on
Browse files Browse the repository at this point in the history
  • Loading branch information
brianking committed Dec 13, 2011
1 parent 8f8793b commit d4fa323
Show file tree
Hide file tree
Showing 10 changed files with 133 additions and 0 deletions.
Empty file removed README
Empty file.
3 changes: 3 additions & 0 deletions 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
Binary file added data/Remo16.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/Remo32.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/Remo64.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
58 changes: 58 additions & 0 deletions data/remo.html
@@ -0,0 +1,58 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>ReMo Companion</title>
<meta charset="utf-8" />
<style>
body {
color: #000305;
font-size: 87.5%; /* Base font size: 14px */
font-family: 'Trebuchet MS', Trebuchet, 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
line-height: 1.429;
margin: 0;
padding: 0;
text-align: left;
clear: both; margin: 0 auto; width: 400px;
background-color: #9E322C;
}
h2 {font-size: 1.2em}
#content > div {
background-color: white;
-moz-border-radius: 1em;
padding: 0.8em 1.5em;
}
</style>
<script>

</script>
</head>

<body id="index" class="home">

<header id="banner">

<h1><img src="Remo64.png" style="vertical-align: middle; padding: 0 0.5em;"/>Remo Companion</h1>
</header>

<section id="content">
<div>

<h3>About this Add-on</h3>

<p>The ReMo Companion provides easy access to tools and documentation for Mozilla Reps.</p>

<p>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. </p>

</div>

</section>

<footer style="text-align: center;">
<p>The ReMo Companion is published under the <a href="http://www.mozilla.org/MPL/">Mozilla Public License (MPL)</a>.</p>
</footer>

</body>
</html>
3 changes: 3 additions & 0 deletions 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.
24 changes: 24 additions & 0 deletions 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"
});
13 changes: 13 additions & 0 deletions 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"
}
32 changes: 32 additions & 0 deletions 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);
};

0 comments on commit d4fa323

Please sign in to comment.