File tree 5 files changed +27
-13
lines changed
5 files changed +27
-13
lines changed Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change
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
+ } ) ;
Original file line number Diff line number Diff line change
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
+ }
Original file line number Diff line number Diff line change
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 ) ;
You can’t perform that action at this time.
0 commit comments