move listener definitions above references

This commit is contained in:
Will Bamberg
2016-02-19 13:30:32 -08:00
parent 84c0bcf024
commit 1967f9ba6a
3 changed files with 32 additions and 31 deletions

View File

@@ -1,15 +1,16 @@
/*
Add openMyPage() as a listener to clicks on the browser action.
*/
chrome.browserAction.onClicked.addListener(openMyPage);
/*
Open a new tab, and load "my-page.html" into it.
*/
function openMyPage() {
console.log("injecting");
chrome.tabs.create({
"url": chrome.extension.getURL("my-page.html")
});
}
/*
Open a new tab, and load "my-page.html" into it.
*/
function openMyPage() {
console.log("injecting");
chrome.tabs.create({
"url": chrome.extension.getURL("my-page.html")
});
}
/*
Add openMyPage() as a listener to clicks on the browser action.
*/
chrome.browserAction.onClicked.addListener(openMyPage);