summaryrefslogtreecommitdiff
path: root/js/flatfile.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2013-08-02 17:21:32 -0400
committerJules Laplace <jules@okfoc.us>2013-08-02 17:21:32 -0400
commit0003c072cb83f48386c5e264d86b0aa3a9eaa20d (patch)
treebd9a40fd1c387cc054b03ec1376927e7027d330f /js/flatfile.js
parentd4d9fc9513925397d71b4ac1ed3426fd6e7dc0e7 (diff)
app
Diffstat (limited to 'js/flatfile.js')
-rw-r--r--js/flatfile.js13
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