Created
January 10, 2014 19:36
-
-
Save MikeRogers0/8361072 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
chrome.browserAction.onClicked.addListener(function(tab) { | |
alert('Oh hey there! You checky clicker!'); | |
chrome.tabs.executeScript(tab.id, {code: 'alert("I just came from the page!")'}); | |
chrome.tabs.executeScript(tab.id, {file: 'some_file.js'}); | |
}) |
This file contains hidden or 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
{ | |
"name": "Clicker MoBob", | |
"version": "1", | |
"manifest_version": 2, | |
"description": "Calls you mean thinks when you click the button", | |
"background": { | |
"scripts": ["js/objects.js","js/background.js"] | |
}, | |
"default_locale": "en", | |
"content_security_policy": "script-src 'self'; object-src 'self';", | |
"permissions": [ | |
"tabs" | |
], | |
"browser_action": { | |
"default_title": "Click me", | |
"default_icon": "imgs/icon.png" | |
}, | |
"icons": { | |
"16": "imgs/icon.png", | |
"48": "imgs/icon.png", | |
"128": "imgs/icon.png" | |
}, | |
"minimum_chrome_version": "18", | |
"offline_enabled": false | |
} |
This file contains hidden or 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
alert("I'm the file you injected.") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment