From 37e43ad19d82f75debc08d89e932cd992e10cca2 Mon Sep 17 00:00:00 2001 From: Zixaphir Date: Fri, 16 Jan 2015 10:02:21 -0700 Subject: [PATCH] Fix theme importing #861 note to self: use node.nextElementSibling when assuming the needed node is an element. --- builds/appchan-x.user.js | 8 ++++---- builds/crx/script.js | 8 ++++---- src/General/Settings.coffee | 4 ++-- src/Theming/Mascots.coffee | 2 +- src/Theming/Themes.coffee | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/builds/appchan-x.user.js b/builds/appchan-x.user.js index 9679d3705..86ef225bd 100644 --- a/builds/appchan-x.user.js +++ b/builds/appchan-x.user.js @@ -17535,7 +17535,7 @@ container = $("#mascotcontent", dialog); fileRice = function(e) { if (e.shiftKey) { - return this.nextSibling.click(); + return this.nextElementSibling.click(); } }; updateMascot = function() { @@ -18154,7 +18154,7 @@ }); $.on(input, 'click', function(evt) { if (evt.shiftKey) { - return this.nextSibling.click(); + return this.nextElementSibling.click(); } }); $.on(fileInput, 'change', function(evt) { @@ -19648,7 +19648,7 @@ return Settings.close(); }); $.on($("#import", div), 'click', function() { - return this.nextSibling.click(); + return this.nextElementSibling.click(); }); $.on($("#importbutton", div), 'change', ThemeTools.importtheme); $.on($('#tUndelete', div), 'click', function() { @@ -19815,7 +19815,7 @@ return Settings.close(); }); $.on($("#importMascot", batchmascots), 'click', function() { - return this.nextSibling.click(); + return this.nextElementSibling.click(); }); $.on($("#importMascotButton", batchmascots), 'change', MascotTools.importMascot); $.on($('#undelete', batchmascots), 'click', function() { diff --git a/builds/crx/script.js b/builds/crx/script.js index 409929017..d2af1ff02 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -17557,7 +17557,7 @@ container = $("#mascotcontent", dialog); fileRice = function(e) { if (e.shiftKey) { - return this.nextSibling.click(); + return this.nextElementSibling.click(); } }; updateMascot = function() { @@ -18182,7 +18182,7 @@ }); $.on(input, 'click', function(evt) { if (evt.shiftKey) { - return this.nextSibling.click(); + return this.nextElementSibling.click(); } }); $.on(fileInput, 'change', function(evt) { @@ -19679,7 +19679,7 @@ return Settings.close(); }); $.on($("#import", div), 'click', function() { - return this.nextSibling.click(); + return this.nextElementSibling.click(); }); $.on($("#importbutton", div), 'change', ThemeTools.importtheme); $.on($('#tUndelete', div), 'click', function() { @@ -19846,7 +19846,7 @@ return Settings.close(); }); $.on($("#importMascot", batchmascots), 'click', function() { - return this.nextSibling.click(); + return this.nextElementSibling.click(); }); $.on($("#importMascotButton", batchmascots), 'change', MascotTools.importMascot); $.on($('#undelete', batchmascots), 'click', function() { diff --git a/src/General/Settings.coffee b/src/General/Settings.coffee index 386df8e8b..adf0deb2a 100755 --- a/src/General/Settings.coffee +++ b/src/General/Settings.coffee @@ -570,7 +570,7 @@ Settings = Settings.close() $.on $("#import", div), 'click', -> - @nextSibling.click() + @nextElementSibling.click() $.on $("#importbutton", div), 'change', ThemeTools.importtheme @@ -726,7 +726,7 @@ Settings = Settings.close() $.on $("#importMascot", batchmascots), 'click', -> - @nextSibling.click() + @nextElementSibling.click() $.on $("#importMascotButton", batchmascots), 'change', MascotTools.importMascot diff --git a/src/Theming/Mascots.coffee b/src/Theming/Mascots.coffee index 10a8bd5dd..26ddf7992 100644 --- a/src/Theming/Mascots.coffee +++ b/src/Theming/Mascots.coffee @@ -153,7 +153,7 @@ MascotTools = fileRice = (e) -> if e.shiftKey - @nextSibling.click() + @nextElementSibling.click() updateMascot = -> MascotTools.change editMascot diff --git a/src/Theming/Themes.coffee b/src/Theming/Themes.coffee index 6c51c2736..d530051c1 100644 --- a/src/Theming/Themes.coffee +++ b/src/Theming/Themes.coffee @@ -125,7 +125,7 @@ ThemeTools = $.on input, 'click', (evt) -> if evt.shiftKey - @nextSibling.click() + @nextElementSibling.click() $.on fileInput, 'change', (evt) -> ThemeTools.uploadImage evt, @