From aafaadb8ebb5d28bccb6db627f22485a8412ee95 Mon Sep 17 00:00:00 2001 From: Zixaphir Date: Tue, 3 Sep 2013 16:43:33 -0700 Subject: [PATCH] Fix #448 --- builds/appchan-x.user.js | 6 +++--- builds/crx/script.js | 6 +++--- src/Theming/Mascots.coffee | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/builds/appchan-x.user.js b/builds/appchan-x.user.js index b30ddfacb..cd99dba4a 100644 --- a/builds/appchan-x.user.js +++ b/builds/appchan-x.user.js @@ -12120,7 +12120,7 @@ }); }, toggle: function() { - var enabled, i, len, mascot, name, string; + var el, enabled, i, len, mascot, name, string; string = g.MASCOTSTRING; enabled = Conf[string]; @@ -12130,8 +12130,8 @@ Conf['mascot'] = name = enabled[i = Math.floor(Math.random() * len)]; if (!(mascot = Mascots[name])) { enabled.splice(i, 1); - if (el) { - el.src = ""; + if (el = this.el.firstElementChild) { + $.replace(el, $.el('img')); } $.set(string, Conf[string] = enabled); return MascotTools.toggle(); diff --git a/builds/crx/script.js b/builds/crx/script.js index d7e85710b..1bf5bba6b 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -12116,7 +12116,7 @@ }); }, toggle: function() { - var enabled, i, len, mascot, name, string; + var el, enabled, i, len, mascot, name, string; string = g.MASCOTSTRING; enabled = Conf[string]; @@ -12126,8 +12126,8 @@ Conf['mascot'] = name = enabled[i = Math.floor(Math.random() * len)]; if (!(mascot = Mascots[name])) { enabled.splice(i, 1); - if (el) { - el.src = ""; + if (el = this.el.firstElementChild) { + $.replace(el, $.el('img')); } $.set(string, Conf[string] = enabled); return MascotTools.toggle(); diff --git a/src/Theming/Mascots.coffee b/src/Theming/Mascots.coffee index c79c4e3fe..c6d5096a8 100644 --- a/src/Theming/Mascots.coffee +++ b/src/Theming/Mascots.coffee @@ -73,7 +73,7 @@ MascotTools = unless mascot = Mascots[name] enabled.splice i, 1 - el.src = "" if el + $.replace el, $.el 'img' if el = @el.firstElementChild $.set string, Conf[string] = enabled return MascotTools.toggle()