forked from indexeddbshim/IndexedDBShim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
139 lines (138 loc) · 7.46 KB
/
index.html
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<link href="/jquery-indexeddb/style.css" type="text/css" rel="stylesheet"/>
<title>IndexedDB Polyfill</title>
</head>
<body>
<div id = "content-wrap">
<h1>IndexedDB Polyfill over WebSql</h1>
<div id = "content">
<div id = "download">
<a href = "dist/IndexedDBShim.min.js" target="_blank" class = "punch">Download indexeddb.shim.js</a>
</div>
<div>
A polyfill to enable IndexedDB using WebSql.
<br/>
IndexedDB is not supported on <a href = "http://caniuse.com/#search=IndexedDB" target="_blank">all browsers</a>.
This IndexedDB polyfill exposes the IndexedDB API in unsupported browsers using WebSQL. This shim is basically an IndexedDB-WebSql adapter.
<br/>
Check out my <a href = "http://blog.nparashuram.com/search/label/indexeddb">blog</a>
for updates.
</div>
<div>
<h2>Download</h2>
<div>
<a href = "dist/IndexedDBShim.min.js" target = "_blank">Download the polyfill</a>
</div>
<div style ="margin-top: 10px;">
To keep the code manageable, the modules are in <a href = "https://github.com/axemclion/IndexedDBShim/tree/gh-pages/src">different files</a>. The link above is simply a concatenation of all these files.
You can build a <a href = "dist/IndexedDBShim.min.js">development</a>
or <a href = "dist/IndexedDBShim.min.js">production (minified)</a>
version by running the default task in the <a href = "https://github.com/cowboy/grunt">gruntfile</a>. The two files will be put in the
<code>
dist
</code>
folder.
You can also concantenate them again with javascript and download that copy using <a href = "javascript:download()">this link</a>.
</div>
</div>
<div>
<h2>Test Cases</h2>
<div>
<a href ="test/index.html">Run the test cases</a>
to see how the polyfill performs on your non-IndexedDB supported browser like Opera or Safari. It also works on Chrome as Chrome also has WebSQL.
This would run on devices like the iPad and the iPhone too !!
</div>
</div>
<div>
<h2>Libraries tested to work with the shim</h2>
<div>
The polyfill implements the IndexedDB API specification.
The following libraries have examples that work with the polyfill.
</div>
<ul>
<li>
<a href = "http://nparashuram.com/jquery-indexeddb">JQuery-IndexedDB</a>
plugin
- <a href = "http://nparashuram.com/jquery-indexeddb/example/">See example</a>
</li>
<li>
LINQ API for IndexedDB <a href = "http://linq2indexeddb.codeplex.com/">LINQ2IndexedDB</a>
</li>
<li>
<a href = "http://pouchdb.com/">PouchDB</a>
Examples - <a href = "/trialtool/index.html#example=/IndexedDBShim/examples/pouchdb.html">See examples</a>
</li>
<li>
<a href = "http://aaronpowell.github.com/db.js/">DB.JS</a>
library - <a href = "/trialtool/index.html#example=/IndexedDBShim/examples/dbjs.html">See Examples</a>
</li>
</ul>
</div>
<div>
<h2>Source Code</h2>
<div>
Fork the repository on <a href = "https://github.com/axemclion/IndexedDBShim">github</a>. The source code is GPL2 and BSD dual licensed.
</div>
<div>
The implementation is not 100% to the spec and some work still needs to be done. There are a couple of <a href = "https://github.com/axemclion/IndexedDBShim/issues">open issues</a>
to be fixed
</div>
<div>
Send out a pull request if you would like to help !!
</div>
</div>
<div>
<h2>Other IndexedDB links</h2>
<ul>
<li>
<a href = "http://nparashuram.com/IndexedDB" target = "_blank">My other IndexedDB work</a>
</li>
<li>
<a href = "http://www.w3.org/TR/IndexedDB/" target = "_blank">IndexedDB Specification</a>
</li>
<li>
<a href = "http://blog.nparashuram.com/search/label/indexeddb" target = "_blank">My blog posts on IndexedDB</a>
</li>
</ul>
</div>
<div>
<h2>Credits</h2>
<div>
A big thanks to the <a href = "https://github.com/axemclion/IndexedDBShim/graphs/contributors">contributors</a>
to this project.
</div>
</div>
</div>
</div>
<script type = "text/javascript" src= "build.js">
</script>
<script type = "text/javascript">
function download(){
var w = window.open(null, "Download IndexedDB Shim", "menubar=false,toolbar=false,dependent=yes,height=500,width=500,centerscreen=yes,resizable=yes,scrollbars=yes,status=no");
w.document.body.innerHTML = "Loading";
buildIndexedDB.concatScripts(function(script){
w.document.body.innerHTML = ("<pre>" + script + "</pre>");
});
}
</script>
<a href="http://github.com/axemclion/IndexedDBShim"><img style="position: absolute; top: 0; left: 0; border: 0;" src="https://a248.e.akamai.net/camo.github.com/bec6c51521dcc8148146135149fe06a9cc737577/687474703a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f6c6566745f6461726b626c75655f3132313632312e706e67" alt="Fork me on GitHub"></a>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-617499-9']);
_gaq.push(['_setDomainName', 'none']);
_gaq.push(['_setAllowLinker', true]);
_gaq.push(['_trackPageview']);
(function(){
var ga = document.createElement('script');
ga.type = 'text/javascript';
ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(ga, s);
})();
</script>
</body>
</html>