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
# This is a basic workflow to help you get started with Actions | |
name: CI | |
# Controls when the action will run. Triggers the workflow on push or pull request | |
# events but only for the master branch | |
on: | |
push: | |
branches: [ master ] | |
pull_request: |
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
{ | |
"name": "chrome-extension-demo", | |
"version": "1.0.0", | |
"description": "This is a demo extension", | |
"main": "index.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1", | |
"deploy": "node deploy.js" | |
}, | |
"repository": { |
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
/* | |
Specifying options page entry to manifest will allow you to use options in your extension. | |
*/ | |
"options_page": "pages/options/options.html", | |
"options_ui": { | |
"page": "pages/options/options.html", | |
"chrome_style": true | |
} |
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
/* | |
Add this to manifest file to inject contentscript.js into web page. | |
*/ | |
"content_scripts": [ | |
{ | |
"matches": [ | |
"http://*/*", | |
"https://*/*" | |
], | |
"css": [ |
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
/* | |
Add this to manifest file so user can see popup on browser action click. | |
*/ | |
"browser_action": { | |
"default_icon": { | |
"19": "images/icon-19.png", | |
"38": "images/icon-38.png" | |
}, | |
"default_title": "My First Extension", | |
"default_popup": "pages/popup/popup.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
/* Create background.js and add this code into it */ | |
chrome.runtime.onInstalled.addListener((details) => { | |
console.log('previousVersion', details.previousVersion) | |
}); | |
console.log('Event Page for Page Action'); |
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
/* Create background.js and add this code into it */ | |
chrome.runtime.onInstalled.addListener((details) => { | |
console.log('previousVersion', details.previousVersion) | |
}); | |
console.log('Event Page for Page Action'); |
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
{ | |
"name": "My First Extension", | |
"short_name": "First App", | |
"description": "App for demo.", | |
"version": "1.0.0", | |
"manifest_version": 2, | |
"icons": { | |
"16": "images/icon-16.png", | |
"128": "images/icon-128.png" | |
} |