Skip to content

Commit 40cf6d5

Browse files
committed
Create gh-pages branch via GitHub
1 parent 33d8059 commit 40cf6d5

11 files changed

Lines changed: 655 additions & 274 deletions

File tree

images/body-bg.png

2.34 KB
Loading

images/highlight-bg.jpg

30.3 KB
Loading

images/hr.png

130 Bytes
Loading

images/octocat-icon.png

477 Bytes
Loading

images/tar-gz-icon.png

741 Bytes
Loading

images/zip-icon.png

735 Bytes
Loading

index.html

Lines changed: 51 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,85 @@
11
<!DOCTYPE html>
2-
<html lang="en-us">
2+
<html>
33
<head>
4-
<meta charset="UTF-8">
5-
<title>Push.js by Nickersoft</title>
6-
<meta name="viewport" content="width=device-width, initial-scale=1">
7-
<link rel="stylesheet" type="text/css" href="stylesheets/normalize.css" media="screen">
8-
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css'>
4+
<meta charset='utf-8'>
5+
<meta http-equiv="X-UA-Compatible" content="chrome=1">
6+
<link href='https://fonts.googleapis.com/css?family=Chivo:900' rel='stylesheet' type='text/css'>
97
<link rel="stylesheet" type="text/css" href="stylesheets/stylesheet.css" media="screen">
10-
<link rel="stylesheet" type="text/css" href="stylesheets/github-light.css" media="screen">
8+
<link rel="stylesheet" type="text/css" href="stylesheets/github-dark.css" media="screen">
9+
<link rel="stylesheet" type="text/css" href="stylesheets/print.css" media="print">
10+
<!--[if lt IE 9]>
11+
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
12+
<![endif]-->
13+
<title>Push.js by Nickersoft</title>
1114
</head>
15+
1216
<body>
13-
<section class="page-header">
14-
<h1 class="project-name">Push.js</h1>
15-
<h2 class="project-tagline">A compact, cross-browser solution for Javascript desktop notifications</h2>
16-
<a href="https://github.com/Nickersoft/push.js" class="btn">View on GitHub</a>
17-
<a href="https://github.com/Nickersoft/push.js/zipball/master" class="btn">Download .zip</a>
18-
<a href="https://github.com/Nickersoft/push.js/tarball/master" class="btn">Download .tar.gz</a>
19-
</section>
20-
21-
<section class="main-content">
22-
<h3>
23-
<a id="what-is-push" class="anchor" href="#what-is-push" aria-hidden="true"><span class="octicon octicon-link"></span></a>What is Push?</h3>
17+
<div id="container">
18+
<div class="inner">
19+
20+
<header>
21+
<h1>Push.js</h1>
22+
<h2>A compact, cross-browser solution for Javascript desktop notifications</h2>
23+
</header>
24+
25+
<section id="downloads" class="clearfix">
26+
<a href="https://github.com/Nickersoft/push.js/zipball/master" id="download-zip" class="button"><span>Download .zip</span></a>
27+
<a href="https://github.com/Nickersoft/push.js/tarball/master" id="download-tar-gz" class="button"><span>Download .tar.gz</span></a>
28+
<a href="https://github.com/Nickersoft/push.js" id="view-on-github" class="button"><span>View on GitHub</span></a>
29+
</section>
30+
31+
<hr>
32+
33+
<section id="main_content">
34+
<h3>
35+
<a id="what-is-push" class="anchor" href="#what-is-push" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>What is Push?</h3>
2436

2537
<p>Push is the fastest way to get up and running with Javascript desktop notifications. A fairly new addition to the official specification, the Notification API allows modern browsers such as Chrome, Safari, and IE 9+ to push notifications to a user's desktop. Push acts as a cross-browser solution to this API, falling back to use older implementations if the user's browser does not support the new API.</p>
2638

2739
<h4>
28-
<a id="creating-notifications" class="anchor" href="#creating-notifications" aria-hidden="true"><span class="octicon octicon-link"></span></a>Creating Notifications</h4>
40+
<a id="creating-notifications" class="anchor" href="#creating-notifications" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Creating Notifications</h4>
2941

3042
<p>So just how easy is it to create a notification using Push? We can do it in just one line, actually:</p>
3143

32-
<div class="highlight highlight-javascript"><pre>Push.create(<span class="pl-s"><span class="pl-pds">'</span>Hello World!<span class="pl-pds">'</span></span>)</pre></div>
44+
<div class="highlight highlight-source-js"><pre><span class="pl-smi">Push</span>.<span class="pl-en">create</span>(<span class="pl-s"><span class="pl-pds">'</span>Hello World!<span class="pl-pds">'</span></span>)</pre></div>
3345

3446
<p>No constructors, just a universal API you can access from anywhere. Push is even compatible with AMD as well:</p>
3547

36-
<div class="highlight highlight-javascript"><pre>define([<span class="pl-s"><span class="pl-pds">'</span>pushjs<span class="pl-pds">'</span></span>], <span class="pl-k">function</span> (<span class="pl-smi">Push</span>) {
37-
Push.create(<span class="pl-s"><span class="pl-pds">'</span>Hello World!<span class="pl-pds">'</span></span>);
48+
<div class="highlight highlight-source-js"><pre><span class="pl-en">define</span>([<span class="pl-s"><span class="pl-pds">'</span>pushjs<span class="pl-pds">'</span></span>], <span class="pl-k">function</span> (<span class="pl-smi">Push</span>) {
49+
<span class="pl-smi">Push</span>.<span class="pl-en">create</span>(<span class="pl-s"><span class="pl-pds">'</span>Hello World!<span class="pl-pds">'</span></span>);
3850
});</pre></div>
3951

4052
<h4>
41-
<a id="closing-notifications" class="anchor" href="#closing-notifications" aria-hidden="true"><span class="octicon octicon-link"></span></a>Closing Notifications</h4>
53+
<a id="closing-notifications" class="anchor" href="#closing-notifications" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Closing Notifications</h4>
4254

4355
<p>When it comes to closing notifications, you have a few options. You can either set a timeout (see "Options"), call Push's close() method, or pass around the notification object and call close() directly. Push's close() method will only work with newer browsers, taking in a notification's unique tag name and closing the first notification it finds with that tag:</p>
4456

45-
<div class="highlight highlight-javascript"><pre>Push.create(<span class="pl-s"><span class="pl-pds">'</span>Hello World!<span class="pl-pds">'</span></span>, {
57+
<div class="highlight highlight-source-js"><pre><span class="pl-smi">Push</span>.<span class="pl-en">create</span>(<span class="pl-s"><span class="pl-pds">'</span>Hello World!<span class="pl-pds">'</span></span>, {
4658
tag<span class="pl-k">:</span> <span class="pl-s"><span class="pl-pds">'</span>foo<span class="pl-pds">'</span></span>
4759
});
4860

4961
<span class="pl-c">// Somewhere later in your code...</span>
5062

51-
Push.<span class="pl-c1">close</span>(<span class="pl-s"><span class="pl-pds">'</span>foo<span class="pl-pds">'</span></span>);</pre></div>
63+
<span class="pl-smi">Push</span>.<span class="pl-c1">close</span>(<span class="pl-s"><span class="pl-pds">'</span>foo<span class="pl-pds">'</span></span>);</pre></div>
5264

5365
<p>Alternatively, you can assign the Notification wrapper returned by Push to a variable and close it directly:</p>
5466

55-
<div class="highlight highlight-javascript"><pre><span class="pl-k">var</span> notification <span class="pl-k">=</span> Push.create(<span class="pl-s"><span class="pl-pds">'</span>Hello World!<span class="pl-pds">'</span></span>);
67+
<div class="highlight highlight-source-js"><pre><span class="pl-k">var</span> notification <span class="pl-k">=</span> <span class="pl-smi">Push</span>.<span class="pl-en">create</span>(<span class="pl-s"><span class="pl-pds">'</span>Hello World!<span class="pl-pds">'</span></span>);
5668

5769
<span class="pl-c">// Somewhere later in your code...</span>
5870

59-
notification.<span class="pl-c1">close</span>();</pre></div>
71+
<span class="pl-smi">notification</span>.<span class="pl-c1">close</span>();</pre></div>
6072

6173
<p>When it comes to clearing all open notifications, that's just as easy as well:</p>
6274

63-
<div class="highlight highlight-javascript"><pre>Push.<span class="pl-c1">clear</span>();</pre></div>
75+
<div class="highlight highlight-source-js"><pre><span class="pl-smi">Push</span>.<span class="pl-c1">clear</span>();</pre></div>
6476

6577
<h3>
66-
<a id="options" class="anchor" href="#options" aria-hidden="true"><span class="octicon octicon-link"></span></a>Options</h3>
78+
<a id="options" class="anchor" href="#options" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Options</h3>
6779

6880
<p>The only required argument in a Push call is a title. However, that doesn't mean you can't add a little something extra. You can pass in options to Push as well, like so:</p>
6981

70-
<div class="highlight highlight-javascript"><pre>Push.create(<span class="pl-s"><span class="pl-pds">'</span>Hello World!<span class="pl-pds">'</span></span>, {
82+
<div class="highlight highlight-source-js"><pre><span class="pl-smi">Push</span>.<span class="pl-en">create</span>(<span class="pl-s"><span class="pl-pds">'</span>Hello World!<span class="pl-pds">'</span></span>, {
7183
body<span class="pl-k">:</span> <span class="pl-s"><span class="pl-pds">'</span>This is some body content!<span class="pl-pds">'</span></span>,
7284
icon<span class="pl-k">:</span> {
7385
x16<span class="pl-k">:</span> <span class="pl-s"><span class="pl-pds">'</span>images/icon-x16.png<span class="pl-pds">'</span></span>,
@@ -77,7 +89,7 @@ <h3>
7789
});</pre></div>
7890

7991
<h4>
80-
<a id="available-options" class="anchor" href="#available-options" aria-hidden="true"><span class="octicon octicon-link"></span></a>Available Options</h4>
92+
<a id="available-options" class="anchor" href="#available-options" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Available Options</h4>
8193

8294
<ul>
8395
<li>
@@ -97,16 +109,15 @@ <h4>
97109
<li>
98110
<strong>timeout</strong>: Time in milliseconds until notification closes automatically.</li>
99111
</ul>
112+
</section>
100113

101-
<footer class="site-footer">
102-
<span class="site-footer-owner"><a href="https://github.com/Nickersoft/push.js">Push.js</a> is maintained by <a href="https://github.com/Nickersoft">Nickersoft</a>.</span>
103-
104-
<span class="site-footer-credits">This page was generated by <a href="https://pages.github.com">GitHub Pages</a> using the <a href="https://github.com/jasonlong/cayman-theme">Cayman theme</a> by <a href="https://twitter.com/jasonlong">Jason Long</a>.</span>
105-
</footer>
114+
<footer>
115+
Push.js is maintained by <a href="https://github.com/Nickersoft">Nickersoft</a><br>
116+
This page was generated by <a href="https://pages.github.com">GitHub Pages</a>. Tactile theme by <a href="https://twitter.com/jasonlong">Jason Long</a>.
117+
</footer>
106118

107-
</section>
108-
109-
119+
120+
</div>
121+
</div>
110122
</body>
111123
</html>
112-

params.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
1-
{"name":"Push.js","tagline":"A compact, cross-browser solution for Javascript desktop notifications","body":"### What is Push? ###\r\n\r\nPush is the fastest way to get up and running with Javascript desktop notifications. A fairly new addition to the official specification, the Notification API allows modern browsers such as Chrome, Safari, and IE 9+ to push notifications to a user's desktop. Push acts as a cross-browser solution to this API, falling back to use older implementations if the user's browser does not support the new API.\r\n\r\n#### Creating Notifications ####\r\nSo just how easy is it to create a notification using Push? We can do it in just one line, actually:\r\n\r\n```javascript\r\nPush.create('Hello World!')\r\n```\r\n\r\nNo constructors, just a universal API you can access from anywhere. Push is even compatible with AMD as well:\r\n\r\n```javascript\r\ndefine(['pushjs'], function (Push) {\r\n Push.create('Hello World!');\r\n});\r\n```\r\n\r\n#### Closing Notifications ####\r\nWhen it comes to closing notifications, you have a few options. You can either set a timeout (see \"Options\"), call Push's close() method, or pass around the notification object and call close() directly. Push's close() method will only work with newer browsers, taking in a notification's unique tag name and closing the first notification it finds with that tag:\r\n\r\n```javascript\r\nPush.create('Hello World!', {\r\n tag: 'foo'\r\n});\r\n\r\n// Somewhere later in your code...\r\n\r\nPush.close('foo');\r\n```\r\n\r\nAlternatively, you can assign the Notification wrapper returned by Push to a variable and close it directly:\r\n\r\n```javascript\r\nvar notification = Push.create('Hello World!');\r\n\r\n// Somewhere later in your code...\r\n\r\nnotification.close();\r\n```\r\n\r\nWhen it comes to clearing all open notifications, that's just as easy as well:\r\n\r\n```javascript\r\nPush.clear();\r\n```\r\n\r\n### Options ###\r\n\r\nThe only required argument in a Push call is a title. However, that doesn't mean you can't add a little something extra. You can pass in options to Push as well, like so:\r\n\r\n```javascript\r\nPush.create('Hello World!', {\r\n body: 'This is some body content!',\r\n icon: {\r\n x16: 'images/icon-x16.png',\r\n x32: 'images/icon-x32.png'\r\n },\r\n timeout: 5000\r\n});\r\n```\r\n\r\n#### Available Options ####\r\n\r\n* __body__: The body text of the notification.\r\n* __icon__: Can be either the URL to an icon image or an array containing 16x16 and 32x32 pixel icon images (see above).\r\n* __onClick__: Callback to execute when the notification is clicked.\r\n* __onClose__: Callback to execute when the notification is closed (obsolete).\r\n* __onError__: Callback to execute when if the notification throws an error.\r\n* __onShow__: Callback to execute when the notification is shown (obsolete).\r\n* __tag__: Unique tag used to identify the notification. Can be used to later close the notification manually.\r\n* __timeout__: Time in milliseconds until notification closes automatically.\r\n","google":"","note":"Don't delete this file! It's used internally to help with page regeneration."}
1+
{
2+
"name": "Push.js",
3+
"tagline": "A compact, cross-browser solution for Javascript desktop notifications",
4+
"body": "### What is Push? ###\r\n\r\nPush is the fastest way to get up and running with Javascript desktop notifications. A fairly new addition to the official specification, the Notification API allows modern browsers such as Chrome, Safari, and IE 9+ to push notifications to a user's desktop. Push acts as a cross-browser solution to this API, falling back to use older implementations if the user's browser does not support the new API.\r\n\r\n#### Creating Notifications ####\r\nSo just how easy is it to create a notification using Push? We can do it in just one line, actually:\r\n\r\n```javascript\r\nPush.create('Hello World!')\r\n```\r\n\r\nNo constructors, just a universal API you can access from anywhere. Push is even compatible with AMD as well:\r\n\r\n```javascript\r\ndefine(['pushjs'], function (Push) {\r\n Push.create('Hello World!');\r\n});\r\n```\r\n\r\n#### Closing Notifications ####\r\nWhen it comes to closing notifications, you have a few options. You can either set a timeout (see \"Options\"), call Push's close() method, or pass around the notification object and call close() directly. Push's close() method will only work with newer browsers, taking in a notification's unique tag name and closing the first notification it finds with that tag:\r\n\r\n```javascript\r\nPush.create('Hello World!', {\r\n tag: 'foo'\r\n});\r\n\r\n// Somewhere later in your code...\r\n\r\nPush.close('foo');\r\n```\r\n\r\nAlternatively, you can assign the Notification wrapper returned by Push to a variable and close it directly:\r\n\r\n```javascript\r\nvar notification = Push.create('Hello World!');\r\n\r\n// Somewhere later in your code...\r\n\r\nnotification.close();\r\n```\r\n\r\nWhen it comes to clearing all open notifications, that's just as easy as well:\r\n\r\n```javascript\r\nPush.clear();\r\n```\r\n\r\n### Options ###\r\n\r\nThe only required argument in a Push call is a title. However, that doesn't mean you can't add a little something extra. You can pass in options to Push as well, like so:\r\n\r\n```javascript\r\nPush.create('Hello World!', {\r\n body: 'This is some body content!',\r\n icon: {\r\n x16: 'images/icon-x16.png',\r\n x32: 'images/icon-x32.png'\r\n },\r\n timeout: 5000\r\n});\r\n```\r\n\r\n#### Available Options ####\r\n\r\n* __body__: The body text of the notification.\r\n* __icon__: Can be either the URL to an icon image or an array containing 16x16 and 32x32 pixel icon images (see above).\r\n* __onClick__: Callback to execute when the notification is clicked.\r\n* __onClose__: Callback to execute when the notification is closed (obsolete).\r\n* __onError__: Callback to execute when if the notification throws an error.\r\n* __onShow__: Callback to execute when the notification is shown (obsolete).\r\n* __tag__: Unique tag used to identify the notification. Can be used to later close the notification manually.\r\n* __timeout__: Time in milliseconds until notification closes automatically.\r\n",
5+
"google": "",
6+
"note": "Don't delete this file! It's used internally to help with page regeneration."
7+
}

stylesheets/github-dark.css

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,25 @@
11
/*
2-
Copyright 2014 GitHub Inc.
3-
4-
Licensed under the Apache License, Version 2.0 (the "License");
5-
you may not use this file except in compliance with the License.
6-
You may obtain a copy of the License at
7-
8-
http://www.apache.org/licenses/LICENSE-2.0
9-
10-
Unless required by applicable law or agreed to in writing, software
11-
distributed under the License is distributed on an "AS IS" BASIS,
12-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
See the License for the specific language governing permissions and
14-
limitations under the License.
2+
The MIT License (MIT)
3+
4+
Copyright (c) 2015 GitHub, Inc.
5+
6+
Permission is hereby granted, free of charge, to any person obtaining a copy
7+
of this software and associated documentation files (the "Software"), to deal
8+
in the Software without restriction, including without limitation the rights
9+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
copies of the Software, and to permit persons to whom the Software is
11+
furnished to do so, subject to the following conditions:
12+
13+
The above copyright notice and this permission notice shall be included in all
14+
copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
SOFTWARE.
1523
1624
*/
1725

0 commit comments

Comments
 (0)