Removed last dependencies

This commit is contained in:
Devine Lu Linvega 2018-01-12 16:38:42 +13:00
parent 28b6bed925
commit 4e957f0f28

View File

@ -1,5 +1,7 @@
function Theme() function Theme()
{ {
var app = this;
this.el = document.createElement("style"); this.el = document.createElement("style");
this.el.type = 'text/css'; this.el.type = 'text/css';
this.default = { background: "#222", f_high: "#fff", f_med: "#777", f_low: "#444", f_inv: "#000", b_high: "#000", b_med: "#affec7", b_low: "#000", b_inv: "#affec7" } this.default = { background: "#222", f_high: "#fff", f_med: "#777", f_low: "#444", f_inv: "#000", b_high: "#000", b_med: "#affec7", b_low: "#000", b_inv: "#affec7" }
@ -8,9 +10,9 @@ function Theme()
this.start = function() this.start = function()
{ {
this.load(localStorage.theme ? localStorage.theme : this.default); this.load(localStorage.theme ? localStorage.theme : this.default);
document.head.appendChild(this.el)
window.addEventListener('dragover',this.drag_enter); window.addEventListener('dragover',this.drag_enter);
window.addEventListener('drop', this.drag); window.addEventListener('drop', this.drag);
document.head.appendChild(this.el)
} }
this.load = function(t) this.load = function(t)
@ -60,7 +62,7 @@ function Theme()
var reader = new FileReader(); var reader = new FileReader();
reader.onload = function(e){ reader.onload = function(e){
dotgrid.theme.load(e.target.result); app.load(e.target.result);
}; };
reader.readAsText(file); reader.readAsText(file);
} }