allow multiple themes

This commit is contained in:
jean-emmanuel 2016-03-22 13:12:24 +01:00
parent 4d31ce742b
commit 73f482b3e0
4 changed files with 25 additions and 8 deletions

View file

@ -81,8 +81,9 @@ module.exports = {
applyStyle: function(event,data){
var data = data || event
console.log(data)
var style = document.createElement('style');
style.innerHTML = data;
style.innerHTML = data.join('');
document.body.appendChild(style);
if (data.indexOf('--pixel-scale')!=-1) {
PXSCALE = data.match(/--pixel-scale\s*:\s*([^;]*)/)[1]