diff options
| author | Jules Laplace <jules@okfoc.us> | 2013-08-02 17:21:32 -0400 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2013-08-02 17:21:32 -0400 |
| commit | 0003c072cb83f48386c5e264d86b0aa3a9eaa20d (patch) | |
| tree | bd9a40fd1c387cc054b03ec1376927e7027d330f /js/flatfile.js | |
| parent | d4d9fc9513925397d71b4ac1ed3426fd6e7dc0e7 (diff) | |
app
Diffstat (limited to 'js/flatfile.js')
| -rw-r--r-- | js/flatfile.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/js/flatfile.js b/js/flatfile.js new file mode 100644 index 0000000..1b6b132 --- /dev/null +++ b/js/flatfile.js @@ -0,0 +1,13 @@ +function Flatfile (key, filename) { + this.key = key; + this.filename = filename; + this.load(); +} +Flatfile.prototype.load = function(){ + var _this = this; + app.loader.register(this.key); + $.get("data/" + this.filename, function(data) { + window[_this.key] = data.split("\n"); + app.loader.ready(_this.key); + }) +}
\ No newline at end of file |
