From 4e957f0f28e01f7f917effb1d71a38e29d6cd7f1 Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Fri, 12 Jan 2018 16:38:42 +1300 Subject: [PATCH] Removed last dependencies --- sources/scripts/theme.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sources/scripts/theme.js b/sources/scripts/theme.js index 46bc9c7..c355259 100644 --- a/sources/scripts/theme.js +++ b/sources/scripts/theme.js @@ -1,5 +1,7 @@ function Theme() { + var app = this; + this.el = document.createElement("style"); 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" } @@ -8,9 +10,9 @@ function Theme() this.start = function() { this.load(localStorage.theme ? localStorage.theme : this.default); - document.head.appendChild(this.el) window.addEventListener('dragover',this.drag_enter); window.addEventListener('drop', this.drag); + document.head.appendChild(this.el) } this.load = function(t) @@ -60,7 +62,7 @@ function Theme() var reader = new FileReader(); reader.onload = function(e){ - dotgrid.theme.load(e.target.result); + app.load(e.target.result); }; reader.readAsText(file); }