summaryrefslogtreecommitdiff
path: root/js/flatfile.js
blob: 89a6b1777de031ff2b0666334df11241e61b77a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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").filter(function(a){ return a && a.length > 0 });
		app.loader.ready(_this.key);
	})
}