first cut of content-scripts

This commit is contained in:
Will Bamberg
2015-09-14 16:01:48 -07:00
parent 88f703edd6
commit b8fbbff171
2 changed files with 48 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
chrome.runtime.onMessage.addListener(handleMessage);
function handleMessage(request, sender, sendResponse) {
switch(request.name) {
case "highlight-para":
highlightPara();
case "show-foo":
showFoo();
case "show-confirm":
showConfirm();
}
}
function highlightPara() {
}
function beastNameToURL(beastName) {
switch (beastName) {
case "Frog":
return chrome.extension.getURL("beasts/frog.jpg");
case "Snake":
return chrome.extension.getURL("beasts/snake.jpg");
case "Turtle":
return chrome.extension.getURL("beasts/turtle.jpg");
}
}