# HG changeset patch # User Atul Varma # Date 1249680028 25200 # Node ID c01a64fefbf5fb39c3f4375206f80c8525e79d3a # Parent 1c02976d8809f62088ffcb4b3f667c8d05f978c3 Added mock 'capability request' page. diff -r 1c02976d8809 -r c01a64fefbf5 extension/content/css/base.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/extension/content/css/base.css Fri Aug 07 14:20:28 2009 -0700 @@ -0,0 +1,18 @@ +body { + font-family: Helvetica; + font-size: 18pt; + background-color: #eeeeee; + text-align: center; +} + +#content { + width: 640px; + margin: 0 auto; + text-align: left; +} + +.button { + padding: 12pt; + color: white; + background-color: #222222; +} diff -r 1c02976d8809 -r c01a64fefbf5 extension/content/request.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/extension/content/request.html Fri Aug 07 14:20:28 2009 -0700 @@ -0,0 +1,23 @@ + + + + With Great Power Comes Great Responsibility. + + +
+

With Great Power Comes Great Responsibility.

+

The page +at file:///Users/varmaa/Documents/blah.html +would like the following superpowers:

+ +

Will you grant these superpowers to the web page?

+
+Sure. No way! +
+ + diff -r 1c02976d8809 -r c01a64fefbf5 extension/modules/content-injector.js --- a/extension/modules/content-injector.js Thu Aug 06 17:18:45 2009 -0700 +++ b/extension/modules/content-injector.js Fri Aug 07 14:20:28 2009 -0700 @@ -31,13 +31,18 @@ if (oldNotification) nBox.removeNotification(oldNotification); + function onClickButton() { + // TODO: Implement a real callback. + const CAP_URI = "chrome://powerbox/content/request.html"; + tabbrowser.selectedTab = tabbrowser.addTab(CAP_URI); + } + nBox.appendNotification(REQUEST_BOX_TEXT, REQUEST_BOX_NAME, null, nBox.PRIORITY_INFO_MEDIUM, [{accessKey: null, - // TODO: Implement a real callback. - callback: function() {}, + callback: onClickButton, label: REQUEST_BOX_BUTTON_TEXT, popup: null}]); }