Skip to content

Instantly share code, notes, and snippets.

@mrpapercut
Last active September 29, 2023 17:15
Show Gist options
  • Save mrpapercut/2ac7d5ed0551d04ac649 to your computer and use it in GitHub Desktop.
Save mrpapercut/2ac7d5ed0551d04ac649 to your computer and use it in GitHub Desktop.
Chrome Packaged App example
/*
* Javascript goes here
*/
chrome.app.runtime.onLaunched.addListener(function() {
chrome.app.window.create('index.html', {
frame: 'none',
outerBounds: {
'width': 480,
'height': 640
},
resizable: false
});
});
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title></title>
<link href="stylesheet.css" rel="stylesheet">
<script src="app.js"></script>
</head>
<body>
<h1>Hello world</h1>
</body>
</html>
{
"manifest_version": 2,
"name": "Package Calculator",
"description": "Package calculator for calculating packages",
"version": "0.0.1",
"app": {
"background": {
"scripts": ["background.js"]
}
}
}
/*
* CSS goes here
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment