Skip to content

Commit 276ed1f

Browse files
committed
Create gh-pages branch via GitHub
1 parent 82e08ca commit 276ed1f

2 files changed

Lines changed: 36 additions & 5 deletions

File tree

index.html

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,17 @@ <h2>A compact, cross-browser solution for Javascript desktop notifications</h2>
3131
<hr>
3232

3333
<section id="main_content">
34-
<h3>
34+
<h1>
35+
<a id="push-" class="anchor" href="#push-" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Push <a href="https://travis-ci.org/Nickersoft/push.js"><img src="https://travis-ci.org/Nickersoft/push.js.svg?branch=master" alt="Build Status"></a>
36+
</h1>
37+
38+
<h3>
3539
<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>
3640

37-
<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>
41+
<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. You can quickly install Push via npm:</p>
42+
43+
<pre><code>npm install push.js --save
44+
</code></pre>
3845

3946
<h4>
4047
<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>
@@ -109,14 +116,38 @@ <h4>
109116
<li>
110117
<strong>timeout</strong>: Time in milliseconds until notification closes automatically.</li>
111118
</ul>
119+
120+
<h3>
121+
<a id="credits" class="anchor" href="#credits" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Credits</h3>
122+
123+
<p>Push is based off work the following work:</p>
124+
125+
<ol>
126+
<li>
127+
<a href="https://github.com/ttsvetko/HTML5-Desktop-Notifications">HTML5-Desktop-Notifications</a> by <a href="https://github.com/ttsvetko">Tsvetan Tsvetkov</a>
128+
</li>
129+
<li>
130+
<a href="https://github.com/alexgibson/notify.js">notify.js</a> by <a href="alexgibson">Alex Gibson</a>
131+
</li>
132+
</ol>
112133
</section>
113134

114135
<footer>
115136
Push.js is maintained by <a href="https://github.com/Nickersoft">Nickersoft</a><br>
116137
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>.
117138
</footer>
118139

119-
140+
<script type="text/javascript">
141+
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
142+
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
143+
</script>
144+
<script type="text/javascript">
145+
try {
146+
var pageTracker = _gat._getTracker("UA-76762106-1");
147+
pageTracker._trackPageview();
148+
} catch(err) {}
149+
</script>
150+
120151
</div>
121152
</div>
122153
</body>

params.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "Push.js",
33
"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": "",
4+
"body": "# Push [![Build Status](https://travis-ci.org/Nickersoft/push.js.svg?branch=master)](https://travis-ci.org/Nickersoft/push.js)\r\n\r\n### 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. You can quickly install Push via npm:\r\n\r\n```\r\nnpm install push.js --save\r\n```\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\r\n### Credits ###\r\nPush is based off work the following work:\r\n\r\n1. [HTML5-Desktop-Notifications](https://github.com/ttsvetko/HTML5-Desktop-Notifications) by [Tsvetan Tsvetkov](https://github.com/ttsvetko)\r\n2. [notify.js](https://github.com/alexgibson/notify.js) by [Alex Gibson](alexgibson)\r\n",
5+
"google": "UA-76762106-1",
66
"note": "Don't delete this file! It's used internally to help with page regeneration."
77
}

0 commit comments

Comments
 (0)