Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is boilerplate. It's not terribly exciting.
- Loading branch information
Showing
12 changed files
with
195 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
Copyright (c) 2012, <OWNER> | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without modification, | ||
are permitted provided that the following conditions are met: | ||
|
||
* Redistributions of source code must retain the above copyright notice, this | ||
list of conditions and the following disclaimer. | ||
|
||
* Redistributions in binary form must reproduce the above copyright notice, | ||
this list of conditions and the following disclaimer in the documentation | ||
and/or other materials provided with the distribution. | ||
|
||
* Neither the name of the <ORGANIZATION> nor the names of its contributors may | ||
be used to endorse or promote products derived from this software without | ||
specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | ||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR | ||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | ||
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
Extension Hackathon Boilerplate | ||
=============================== | ||
|
||
This is boilerplate for an extension hackathon entry. You should replace this | ||
text with an actual description of the project you've put together. | ||
|
||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent ornare ornare | ||
semper. Praesent at nisi nulla. Sed massa dolor, sollicitudin sit amet | ||
vestibulum elementum, viverra non mauris. Nam risus elit, eleifend sed malesuada | ||
sit amet, blandit quis dui. Ut commodo, risus a fringilla viverra, magna purus | ||
gravida enim, eu porta arcu libero nec risus. Sed et nisl non ante imperdiet | ||
venenatis a eget lorem. Cras nisi sem, lobortis ac feugiat ut, convallis sit | ||
amet orci. Cras sed libero nec dui euismod condimentum nec sit amet risus. Fusce | ||
non purus augue. Aenean id dolor arcu. Integer vel magna mauris, a volutpat | ||
velit. Cras a erat mattis sapien laoreet tristique. Quisque orci nulla, eleifend | ||
vitae mattis non, dictum nec tellus. Ut ultrices magna a mi pharetra | ||
sollicitudin nec in metus. | ||
|
||
License | ||
------- | ||
|
||
The license for this extension can be found in the [LICENSE.markdown][4] file. | ||
|
||
_Contest entries must be either [BSD][1], [MIT][2], or [Apache2][3] licensed. | ||
Please adjust the [LICENSE.markdown][4] file to taste._ | ||
|
||
[1]: http://opensource.org/licenses/BSD-3-Clause | ||
[2]: http://opensource.org/licenses/mit-license.html | ||
[3]: http://www.apache.org/licenses/LICENSE-2.0.html | ||
[4]: https://github.com/mikewest/ExtensionHackathonBoilerplate/blob/master/LICENSE.markdown | ||
|
||
Authors | ||
------- | ||
|
||
* Jane Doe: http://example.com/ | ||
* John Doe: http://example.com/ |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{ | ||
/**************************************************************************** | ||
* Meta-information | ||
*/ | ||
"name": "[EXTENSION NAME GOES HERE]", | ||
"description": "[EXTENSION DESCRIPTION GOES HERE]", | ||
"version": "0.1", | ||
"manifest_version": 2, | ||
|
||
/**************************************************************************** | ||
* Icons | ||
*/ | ||
"icons": { | ||
"16": "icons/16.png", | ||
"19": "icons/19.png", | ||
"48": "icons/48.png", | ||
"129": "icons/128.png" | ||
}, | ||
|
||
/**************************************************************************** | ||
* Browser Action: | ||
* - http://developer.chrome.com/trunk/extensions/browserAction.html | ||
*/ | ||
"browser_action": { | ||
"default_icon": "icons/19.png", // optional | ||
"default_title": "[POPUP TITLE]", // optional; shown in tooltip | ||
"default_popup": "src/popup.html" // optional | ||
}, | ||
|
||
/**************************************************************************** | ||
* Event Page: | ||
* - http://developer.chrome.com/trunk/extensions/event_pages.html | ||
*/ | ||
"background": { | ||
"persistent": false, | ||
"scripts": [ | ||
"src/eventPage.js" | ||
] | ||
}, | ||
|
||
/**************************************************************************** | ||
* Permissions: | ||
* - https://developer.chrome.com/trunk/extensions/manifest.html#permissions | ||
*/ | ||
"permissions": [ | ||
"storage" // https://developer.chrome.com/trunk/extensions/storage.html | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// Copyright 2012, <OWNER>: License details can be found in LICENSE.markdown. | ||
|
||
chrome.runtime.onInstalled.addEventListener(function () { | ||
// Do any one-time setup here. This listener will be triggered once upon | ||
// extension installation, and once each time the extension is upgraded to a | ||
// newer version. | ||
|
||
chrome.storage.local.set("INSTALLED", true); | ||
}); | ||
|
||
// The rest of this script should contain the inner workings of your extension. | ||
// If you were interested in doing something when the user activates a tab, for | ||
// instance, you might include code like the following: | ||
|
||
chrome.tabs.onActivated.addListener(function (activeTab) { | ||
// Do something amazing with Tab ID `activeTab.tabId`! | ||
chrome.tabs.get(activeTab.tabId, function (details) { | ||
alert("Tab ID #" + details.id + " is displaying " + details.url + "! Wow!"); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* Copyright 2012, <OWNER>: License details can be found in LICENSE.markdown. */ | ||
|
||
html { | ||
background: #FFF; | ||
padding: 5px; | ||
} | ||
|
||
body { | ||
background: #DDD; | ||
border-radius: 5px; | ||
font: 12px/1.2 Helvetica Neue, Helvetica, Arial, Sans Serif; | ||
width: 350px; | ||
padding: 10px; | ||
margin: 0; | ||
} | ||
|
||
h1 { | ||
margin: 0.2em 0; | ||
} | ||
|
||
#clock { | ||
font: 14px/1 monospace; | ||
font-weight: 700; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<!doctype html> | ||
<!-- Copyright 2012, <OWNER>: License details can be found in LICENSE.markdown. --> | ||
<html> | ||
<head> | ||
<title>Boilerplate Popup!</title> | ||
<!-- | ||
All JavaScript must be loaded via external JS files. For details, see | ||
http://developer.chrome.com/trunk/extensions/contentSecurityPolicy.html. | ||
--> | ||
<script src="/src/popup.js"></script> | ||
<link href="/src/popup.css" rel="stylesheet"></link> | ||
</head> | ||
<body> | ||
<h1>Boilerplate popup</h1> | ||
<p> | ||
This is where some interesting, interactive functionality might live. | ||
Right now, it displays the current time. We trust you can do better. | ||
</p> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Copyright 2012, <OWNER>: License details can be found in LICENSE.markdown. | ||
|
||
function displayTime() { | ||
var clock = document.querySelector('#clock'); | ||
clock.innerText = Date(); | ||
} | ||
|
||
function main() { | ||
var clock = document.createElement('p'); | ||
clock.id = "clock"; | ||
clock.innerText = Date(); | ||
document.body.appendChild(clock); | ||
setInterval(displayTime, 1000); | ||
} | ||
|
||
// Kick things off once the plugin's content loads. | ||
document.addEventListener("DOMContentLoaded", function () { | ||
main(); | ||
}); |