From 0003c072cb83f48386c5e264d86b0aa3a9eaa20d Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Fri, 2 Aug 2013 17:21:32 -0400 Subject: app --- js/flatfile.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 js/flatfile.js (limited to 'js/flatfile.js') 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 -- cgit v1.2.3-70-g09d2