diff --git a/builds/appchan-x.user.js b/builds/appchan-x.user.js
index 7fd1217f7..4f20f4e5a 100644
--- a/builds/appchan-x.user.js
+++ b/builds/appchan-x.user.js
@@ -11085,7 +11085,7 @@
innerHTML: "
"
}),
change: function(mascot) {
- var el, image;
+ var el;
el = this.el.firstElementChild;
if (!Conf['Mascots']) {
@@ -11107,8 +11107,7 @@
} else if (!Conf['Silhouettize Mascots']) {
$.rmClass(doc, 'silhouettize-mascots');
}
- image = Array.isArray(mascot.image) ? Style.lightTheme ? mascot.image[1] : mascot.image[0] : mascot.image;
- el.src = image;
+ el.src = Array.isArray(mascot.image) ? Style.lightTheme ? mascot.image[1] : mascot.image[0] : mascot.image;
return Style.mascot.textContent = "#mascot img {\nheight: " + (mascot.height && isNaN(parseFloat(mascot.height)) ? mascot.height : mascot.height ? parseInt(mascot.height, 10) + 'px' : 'auto') + ";\nwidth: " + (mascot.width && isNaN(parseFloat(mascot.width)) ? mascot.width : mascot.width ? parseInt(mascot.width, 10) + 'px' : 'auto') + ";\n}\n#mascot {\nmargin: " + (mascot.vOffset || 0) + "px " + (mascot.hOffset || 0) + "px;\n}\n.sidebar-large #mascot {\nleft: " + (mascot.center ? 25 : 0) + "px;\nright: " + (mascot.center ? 25 : 0) + "px;\n}\n.mascot-position-above-post-form.post-form-style-fixed #mascot {\ntransform: translateY(-" + (QR.nodes ? QR.nodes.el.getBoundingClientRect().height : 0) + "px);\n}";
},
toggle: function() {
@@ -11249,7 +11248,7 @@
return $.add(d.body, dialog);
},
input: function(item, name) {
- var div, value;
+ var value;
if (Array.isArray(editMascot[name])) {
if (Style.lightTheme) {
@@ -11261,11 +11260,10 @@
value = editMascot[name];
}
editMascot[name] = value;
- div = $.el("div", {
+ return $.el("div", {
className: "mascotvar",
innerHTML: "
" + item[0] + "
"
});
- return div;
},
uploadImage: function(evt, el) {
var file, reader;
diff --git a/builds/crx/script.js b/builds/crx/script.js
index 064d6fa1a..d056408be 100644
--- a/builds/crx/script.js
+++ b/builds/crx/script.js
@@ -11072,7 +11072,7 @@
innerHTML: "
"
}),
change: function(mascot) {
- var el, image;
+ var el;
el = this.el.firstElementChild;
if (!Conf['Mascots']) {
@@ -11094,8 +11094,7 @@
} else if (!Conf['Silhouettize Mascots']) {
$.rmClass(doc, 'silhouettize-mascots');
}
- image = Array.isArray(mascot.image) ? Style.lightTheme ? mascot.image[1] : mascot.image[0] : mascot.image;
- el.src = image;
+ el.src = Array.isArray(mascot.image) ? Style.lightTheme ? mascot.image[1] : mascot.image[0] : mascot.image;
return Style.mascot.textContent = "#mascot img {\nheight: " + (mascot.height && isNaN(parseFloat(mascot.height)) ? mascot.height : mascot.height ? parseInt(mascot.height, 10) + 'px' : 'auto') + ";\nwidth: " + (mascot.width && isNaN(parseFloat(mascot.width)) ? mascot.width : mascot.width ? parseInt(mascot.width, 10) + 'px' : 'auto') + ";\n}\n#mascot {\nmargin: " + (mascot.vOffset || 0) + "px " + (mascot.hOffset || 0) + "px;\n}\n.sidebar-large #mascot {\nleft: " + (mascot.center ? 25 : 0) + "px;\nright: " + (mascot.center ? 25 : 0) + "px;\n}\n.mascot-position-above-post-form.post-form-style-fixed #mascot {\n-webkit-transform: translateY(-" + (QR.nodes ? QR.nodes.el.getBoundingClientRect().height : 0) + "px);\n}";
},
toggle: function() {
@@ -11236,7 +11235,7 @@
return $.add(d.body, dialog);
},
input: function(item, name) {
- var div, value;
+ var value;
if (Array.isArray(editMascot[name])) {
if (Style.lightTheme) {
@@ -11248,11 +11247,10 @@
value = editMascot[name];
}
editMascot[name] = value;
- div = $.el("div", {
+ return $.el("div", {
className: "mascotvar",
innerHTML: "" + item[0] + "
"
});
- return div;
},
uploadImage: function(evt, el) {
var file, reader;
diff --git a/src/Theming/Mascots.coffee b/src/Theming/Mascots.coffee
index 3c999c78b..0cea804c0 100644
--- a/src/Theming/Mascots.coffee
+++ b/src/Theming/Mascots.coffee
@@ -34,10 +34,11 @@ MascotTools =
if mascot.silhouette and not Conf['Silhouettize Mascots']
$.addClass doc, 'silhouettize-mascots'
+
else unless Conf['Silhouettize Mascots']
$.rmClass doc, 'silhouettize-mascots'
- image =
+ el.src =
if Array.isArray mascot.image
if Style.lightTheme
mascot.image[1]
@@ -46,8 +47,6 @@ MascotTools =
else
mascot.image
- el.src = image
-
Style.mascot.textContent = """<%= grunt.file.read('src/General/css/mascot.css') %>"""
toggle: ->
@@ -231,12 +230,10 @@ MascotTools =
editMascot[name] = value
- div = $.el "div",
+ $.el "div",
className: "mascotvar"
innerHTML: "#{item[0]}
"
- return div
-
uploadImage: (evt, el) ->
file = evt.target.files[0]
reader = new FileReader()