From d8b8028459ff1cb39b658d2061dfe33a5618f99a Mon Sep 17 00:00:00 2001 From: Zixaphir Date: Sat, 3 May 2014 02:08:24 -0700 Subject: [PATCH] Deal with some undefined behavior --- builds/4chan-X.user.js | 3 +++ builds/crx/script.js | 3 +++ src/General/Build.coffee | 3 +++ 3 files changed, 9 insertions(+) diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 57580fdda..ac6cddd92 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -3762,6 +3762,9 @@ pageNum = Math.floor(Index.liveThreadData.keys.indexOf("" + postID) / Index.threadsNumPerPage); pageIcon = " Page " + pageNum + ""; replyLink = "   [Reply]"; + } else { + pageIcon = ''; + replyLink = ''; } container = $.el('div', { id: "pc" + postID, diff --git a/builds/crx/script.js b/builds/crx/script.js index ffe81443b..697edf384 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -3821,6 +3821,9 @@ pageNum = Math.floor(Index.liveThreadData.keys.indexOf("" + postID) / Index.threadsNumPerPage); pageIcon = " Page " + pageNum + ""; replyLink = "   [Reply]"; + } else { + pageIcon = ''; + replyLink = ''; } container = $.el('div', { id: "pc" + postID, diff --git a/src/General/Build.coffee b/src/General/Build.coffee index e27559496..cb8293132 100755 --- a/src/General/Build.coffee +++ b/src/General/Build.coffee @@ -181,6 +181,9 @@ Build = pageNum = Index.liveThreadData.keys.indexOf("#{postID}") // Index.threadsNumPerPage pageIcon = " Page #{pageNum}" replyLink = "   [Reply]" + else + pageIcon = '' + replyLink = '' container = $.el 'div', id: "pc#{postID}"