Theme is now self-reliant
This commit is contained in:
parent
06968a57d2
commit
28b6bed925
@ -9,7 +9,8 @@ function Theme()
|
|||||||
{
|
{
|
||||||
this.load(localStorage.theme ? localStorage.theme : this.default);
|
this.load(localStorage.theme ? localStorage.theme : this.default);
|
||||||
document.head.appendChild(this.el)
|
document.head.appendChild(this.el)
|
||||||
window.addEventListener('drop', dotgrid.theme.drag);
|
window.addEventListener('dragover',this.drag_enter);
|
||||||
|
window.addEventListener('drop', this.drag);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.load = function(t)
|
this.load = function(t)
|
||||||
@ -41,6 +42,13 @@ function Theme()
|
|||||||
this.load(this.default);
|
this.load(this.default);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.drag_enter = function(e)
|
||||||
|
{
|
||||||
|
e.stopPropagation();
|
||||||
|
e.preventDefault();
|
||||||
|
e.dataTransfer.dropEffect = 'copy';
|
||||||
|
}
|
||||||
|
|
||||||
this.drag = function(e)
|
this.drag = function(e)
|
||||||
{
|
{
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
Loading…
Reference in New Issue
Block a user