From 2558660e270b4a9e253be3ff89706c82153be9f8 Mon Sep 17 00:00:00 2001 From: Zixaphir Date: Wed, 25 Dec 2013 20:35:05 -0700 Subject: [PATCH] Fix #505 --- builds/appchan-x.user.js | 6 ++++-- builds/crx/script.js | 6 ++++-- src/Theming/Banner.coffee | 5 ++++- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/builds/appchan-x.user.js b/builds/appchan-x.user.js index 98fd15ba1..c0a6b374e 100644 --- a/builds/appchan-x.user.js +++ b/builds/appchan-x.user.js @@ -12510,13 +12510,14 @@ }); }, ready: function() { - var banner, child, children, i, title; + var banner, child, children, i, nodes, title; banner = $(".boardBanner"); title = $.el("div", { id: "boardTitle" }); children = banner.children; + nodes = []; i = 0; while (child = children[i++]) { if (i === 1) { @@ -12525,11 +12526,12 @@ $.on(child, 'click', Banner.cb.toggle); continue; } + nodes.push(child); if (Conf['Custom Board Titles']) { Banner.custom(child).title = "Ctrl+click to edit board " + (i === 3 ? 'sub' : '') + "title"; } } - $.add(title, [children[1], children[2]]); + $.add(title, nodes); $.after(banner, title); }, cb: { diff --git a/builds/crx/script.js b/builds/crx/script.js index 6c2a197a3..9b1541002 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -12514,13 +12514,14 @@ }); }, ready: function() { - var banner, child, children, i, title; + var banner, child, children, i, nodes, title; banner = $(".boardBanner"); title = $.el("div", { id: "boardTitle" }); children = banner.children; + nodes = []; i = 0; while (child = children[i++]) { if (i === 1) { @@ -12529,11 +12530,12 @@ $.on(child, 'click', Banner.cb.toggle); continue; } + nodes.push(child); if (Conf['Custom Board Titles']) { Banner.custom(child).title = "Ctrl+click to edit board " + (i === 3 ? 'sub' : '') + "title"; } } - $.add(title, [children[1], children[2]]); + $.add(title, nodes); $.after(banner, title); }, cb: { diff --git a/src/Theming/Banner.coffee b/src/Theming/Banner.coffee index 169d0b5eb..929f376ba 100644 --- a/src/Theming/Banner.coffee +++ b/src/Theming/Banner.coffee @@ -8,6 +8,7 @@ Banner = title = $.el "div", id: "boardTitle" {children} = banner + nodes = [] i = 0 while child = children[i++] @@ -19,13 +20,15 @@ Banner = continue + nodes.push child + if Conf['Custom Board Titles'] Banner.custom(child).title = "Ctrl+click to edit board #{if i is 3 'sub' else ''}title" - $.add title, [children[1], children[2]] + $.add title, nodes $.after banner, title return