Skip to content

Commit 79bf3d6

Browse files
First commit
0 parents  commit 79bf3d6

File tree

282 files changed

+24373
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

282 files changed

+24373
-0
lines changed

.DS_Store

6 KB
Binary file not shown.

README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<a target="_blank" href="https://chrome.google.com/webstore/detail/nmfpplkdkcbhediajmbhljkafnlahcda">![Try it now in CWS](https://raw.github.com/GoogleChrome/chrome-app-samples/master/tryitnowbutton.png "Click here to install this sample from the Chrome Web Store")</a>
2+
3+
4+
# Hello World
5+
6+
This is a starter application. It contains a basic manifest file with no
7+
additional permissions. The manifest denotes a background script, main.js,
8+
detailed below:
9+
10+
```javascript
11+
chrome.app.runtime.onLaunched.addListener(function() {
12+
// Center window on screen.
13+
var screenWidth = screen.availWidth;
14+
var screenHeight = screen.availHeight;
15+
var width = 500;
16+
var height = 300;
17+
18+
chrome.app.window.create('index.html', {
19+
id: "helloWorldID",
20+
bounds: {
21+
width: width,
22+
height: height,
23+
left: Math.round((screenWidth-width)/2),
24+
top: Math.round((screenHeight-height)/2)
25+
}
26+
});
27+
});
28+
```
29+
30+
This simply waits for the launch event for the application (`chrome.app.runtime.onLaunched.addListener`)
31+
and, at that point, creates a window using a basic HTML page, index.html, as the source.
32+
33+
## Resources
34+
35+
* [Runtime](http://developer.chrome.com/apps/app.runtime.html)
36+
* [Window](http://developer.chrome.com/apps/app.window.html)
37+
38+
## Screenshot
39+
![screenshot](https://raw.github.com/GoogleChrome/chrome-app-samples/master/hello-world/assets/screenshot_1280_800.png)
40+

api/posts.json

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
[
2+
{
3+
"uid": 1,
4+
"text" : "Have you heard about the Web Components revolution?",
5+
"username" : "Eric",
6+
"avatar" : "../images/avatar-01.svg",
7+
"favorite": false
8+
},
9+
{
10+
"uid": 2,
11+
"text" : "Loving this Polymer thing.",
12+
"username" : "Rob",
13+
"avatar" : "../images/avatar-02.svg",
14+
"favorite": false
15+
},
16+
{
17+
"uid": 3,
18+
"text" : "So last year...",
19+
"username" : "Dimitri",
20+
"avatar" : "../images/avatar-03.svg",
21+
"favorite": false
22+
},
23+
{
24+
"uid": 4,
25+
"text" : "Pretty sure I came up with that first.",
26+
"username" : "Ada",
27+
"avatar" : "../images/avatar-07.svg",
28+
"favorite": false
29+
},
30+
{
31+
"uid": 5,
32+
"text" : "Yo, I heard you like components, so I put a component in your component.",
33+
"username" : "Grace",
34+
"avatar" : "../images/avatar-08.svg",
35+
"favorite": false
36+
},
37+
{
38+
"uid": 6,
39+
"text" : "Centralize, centrailize.",
40+
"username" : "John",
41+
"avatar" : "../images/avatar-04.svg",
42+
"favorite": false
43+
},
44+
{
45+
"uid": 7,
46+
"text" : "Has anyone seen my cat?",
47+
"username" : "Zelda",
48+
"avatar" : "../images/avatar-06.svg",
49+
"favorite": false
50+
},
51+
{
52+
"uid": 8,
53+
"text" : "Decentralize!",
54+
"username" : "Norbert",
55+
"avatar" : "../images/avatar-05.svg",
56+
"favorite": false
57+
}
58+
]

assets/screenshot_1280_800.png

456 KB
Loading

assets/screenshot_thumbnail.png

5.04 KB
Loading

0 commit comments

Comments
 (0)