Skip to content

Commit 539c497

Browse files
committed
commit the code
1 parent c8c9b2e commit 539c497

File tree

5 files changed

+27
-13
lines changed

5 files changed

+27
-13
lines changed

README.md

-13
Original file line numberDiff line numberDiff line change
@@ -1,13 +0,0 @@
1-
Firefox-Mid-Monitor
2-
===================
3-
4-
This is a Firefox XPI extension that adds extra height to the window so content can be scrolled to the middle of your monitor.
5-
6-
To build the project, install the cfx tool first. Then run 'cfx xpi' from the root of this repo
7-
8-
9-
References:
10-
https://developer.mozilla.org/en-US/Add-ons/SDK/Tutorials/Getting_started
11-
https://developer.mozilla.org/en-US/Add-ons/SDK/Tutorials/Modifying_the_Page_Hosted_by_a_Tab
12-
https://developer.mozilla.org/en-US/Add-ons/SDK/High-Level_APIs/page-mod
13-
https://developer.mozilla.org/en-US/Add-ons/SDK

doc/main.md

Whitespace-only changes.

lib/main.js

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
var pageMod = require("sdk/page-mod");
2+
3+
pageMod.PageMod({
4+
include: "*",
5+
contentScript: "console.log('adding extra height to the document');i=document.createElement('p');i.style.height='500px';document.getElementsByTagName('body')[0].appendChild(i);"
6+
});

package.json

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"name": "firefox-mid-monitor",
3+
"title": "Firefox-Mid-Monitor",
4+
"id": "jid1-hKDlNBLL99nTVQ",
5+
"description": "adds extra height to documents so user can scroll content to the middle of the screen",
6+
"author": "David Mann (stembrain)",
7+
"license": "MPL 2.0",
8+
"version": "0.1"
9+
}

test/test-main.js

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
var main = require("./main");
2+
3+
exports["test main"] = function(assert) {
4+
assert.pass("Unit test running!");
5+
};
6+
7+
exports["test main async"] = function(assert, done) {
8+
assert.pass("async Unit test running!");
9+
done();
10+
};
11+
12+
require("sdk/test").run(exports);

0 commit comments

Comments
 (0)