From 813de2b71b3dca3987d2e31c37d14bc8f2e65ae0 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Mon, 26 Jan 2015 01:46:02 -0800 Subject: [PATCH] Fix race condition causing Index.root to be removed. --- builds/appchan-x.user.js | 2 +- builds/crx/script.js | 2 +- src/General/Index.coffee | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/builds/appchan-x.user.js b/builds/appchan-x.user.js index 343cbca3d..e2ad6d6fe 100644 --- a/builds/appchan-x.user.js +++ b/builds/appchan-x.user.js @@ -5126,7 +5126,7 @@ _ref5.parentNode.remove(); } $.after($.x('child::form/preceding-sibling::hr[1]'), Index.navLinks); - if (g.VIEW !== 'index') { + if (g.VIEW !== 'index' || Index.root.parentElement) { return; } board = $('.board'); diff --git a/builds/crx/script.js b/builds/crx/script.js index 230de6a21..0f207a06a 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -5151,7 +5151,7 @@ _ref5.parentNode.remove(); } $.after($.x('child::form/preceding-sibling::hr[1]'), Index.navLinks); - if (g.VIEW !== 'index') { + if (g.VIEW !== 'index' || Index.root.parentElement) { return; } board = $('.board'); diff --git a/src/General/Index.coffee b/src/General/Index.coffee index 3709e2717..c3b3c3759 100644 --- a/src/General/Index.coffee +++ b/src/General/Index.coffee @@ -155,7 +155,7 @@ Index = $.id('search-box')?.parentNode.remove() $.after $.x('child::form/preceding-sibling::hr[1]'), Index.navLinks - return if g.VIEW isnt 'index' + return if g.VIEW isnt 'index' or Index.root.parentElement board = $ '.board' $.replace board, Index.root