forked from roshiro/TitleNotifier.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
115 lines (91 loc) · 5.62 KB
/
Copy pathindex.html
File metadata and controls
115 lines (91 loc) · 5.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link href='https://fonts.googleapis.com/css?family=Architects+Daughter' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="stylesheets/stylesheet.css" media="screen" />
<link rel="stylesheet" type="text/css" href="stylesheets/pygment_trac.css" media="screen" />
<link rel="stylesheet" type="text/css" href="stylesheets/print.css" media="print" />
<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.4.2/pure-min.css">
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<title>TitleNotifier.js - Lightweight, dependency-free JS library for title notification</title>
</head>
<body>
<header>
<div class="inner">
<h1>TitleNotifier.js</h1>
<h2>Lightweight (< 3kb), dependency-free javascript library to dynamically show the number of unread notifications in your webpage title.</h2>
<a href="https://github.com/roshiro/TitleNotifier.js" class="button"><small>View project on</small>GitHub</a>
<iframe src="http://ghbtns.com/github-btn.html?user=roshiro&repo=TitleNotifier.js&type=watch&count=true&size=large" height="30" width="170" frameborder="0" scrolling="0" style="width:170px; height: 30px;" allowTransparency="true"></iframe>
<div class="twitter-header">
<a href="https://twitter.com/share" class="twitter-share-button" data-via="roshiro">Tweet</a>
</div>
</div>
</header>
<div id="content-wrapper">
<div class="inner clearfix">
<section id="main-content">
<img src="images/title_notifier.gif"/>
<h3>
<a name="try-it-now" class="anchor" href="#try-it-now"><span class="octicon octicon-link"></span></a>Try it Now!</h3>
<p>Play around with the buttons below and check the title of the page changing.</p>
<button id="add_btn" type="pure-button pure-button-primary" class="pure-button">+1 Notification</button>
<button id="sub_btn" type="button" class="pure-button">-1 Notification</button>
<button id="res_btn" type="button" class="pure-button">Reset Notification</button>
<h3>
<a name="getting-started" class="anchor" href="#getting-started"><span class="octicon octicon-link"></span></a>Getting Started</h3>
<p>Download the project and include the js file before <code></body></code></p>
<pre><code><script src="title_notifier.js"></script></code></pre>
<h3>
<a name="usage" class="anchor" href="#usage"><span class="octicon octicon-link"></span></a>Usage</h3>
<p>Adding a notification:</p>
<pre><code>titlenotifier.add();</code></pre>
<p>Subtracting a notification:</p>
<pre><code>titlenotifier.sub();</code></pre>
<p>Setting number of notification:</p>
<pre><code>titlenotifier.set(10);</code></pre>
<p>Resetting notification:</p>
<pre><code>titlenotifier.reset();</code></pre>
<h3>
<a name="contribute" class="anchor" href="#contribute"><span class="octicon octicon-link"></span></a>Contribute</h3>
<p>Feel free to contribute by <a href="http://github.com/roshiro/TitleNotifier.js">forking it</a>, making a pull request or logging issues.</p>
<h3>
<a name="more" class="anchor" href="#more"><span class="octicon octicon-link"></span></a>More</h3>
<p>To see more about FrontEnd Development and Open Source, find me: <a href="http://frontendjournal.com/">Blog</a>, <a href="http://twitter.com/roshiro">Twitter</a></p>
<p>
<div class="twitter-footer">
<a href="https://twitter.com/share" class="twitter-share-button" data-via="roshiro">Tweet</a>
</div>
</p>
</section>
<aside id="sidebar">
<a href="https://github.com/roshiro/TitleNotifier.js/archive/0.9.zip" class="button">
<small>Download</small>
.zip file
</a>
<a href="https://github.com/roshiro/TitleNotifier.js/archive/0.9.tar.gz" class="button">
<small>Download</small>
.tar.gz file
</a>
<p class="repo-owner"><a href="https://github.com/roshiro/TitleNotifier.js"></a> is maintained by <a href="https://github.com/roshiro">roshiro</a>.</p>
<p>This page was generated by <a href="https://pages.github.com">GitHub Pages</a> using the Architect theme by <a href="https://twitter.com/jasonlong">Jason Long</a>.</p>
</aside>
</div>
</div>
<script src="javascripts/title_notifier.js"></script>
<script src="javascripts/main.js"></script>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-42515505-2', 'roshiro.github.io');
ga('send', 'pageview');
</script>
</body>
</html>