Skip to content

Instantly share code, notes, and snippets.

@greatghoul
Last active March 15, 2024 07:28
Show Gist options
  • Save greatghoul/8a7671e09bb4875b3a3c to your computer and use it in GitHub Desktop.
Save greatghoul/8a7671e09bb4875b3a3c to your computer and use it in GitHub Desktop.
Chrome Extension Example - Popup Panel
chrome.browserAction.onClicked.addListener(function(tab) {
chrome.windows.create({
url: "panel.html",
width: 320,
height: 480,
type: 'panel'
});
});
{
"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"
}
}
<!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