Last active
March 15, 2024 07:28
-
-
Save greatghoul/8a7671e09bb4875b3a3c to your computer and use it in GitHub Desktop.
Chrome Extension Example - Popup Panel
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
chrome.browserAction.onClicked.addListener(function(tab) { | |
chrome.windows.create({ | |
url: "panel.html", | |
width: 320, | |
height: 480, | |
type: 'panel' | |
}); | |
}); |
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 Example - Popup Panel", | |
"version": "1.0", | |
"manifest_version": 2, | |
"description": "Chrome Extension Example - Popup Panel", | |
"icons": { | |
"48": "icon.png" | |
}, | |
"background": { | |
"scripts": [ "event.js" ], | |
"persistent": false | |
}, | |
"browser_action": { | |
"default_icon": "icon.png" | |
} | |
} |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Chrome Extension Example - Popup Panel</title> | |
</head> | |
<body> | |
Hello Chrome Extension. | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment