From c907adcb71df4abaecaee8a0296a9d0978bcde90 Mon Sep 17 00:00:00 2001 From: Zixaphir Date: Fri, 3 May 2013 12:03:39 -0700 Subject: [PATCH] Fix #247 --- builds/appchan-x.js | 4 +++- builds/appchan-x.user.js | 4 +++- builds/crx/script.js | 4 +++- src/General/Main.coffee | 4 +++- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/builds/appchan-x.js b/builds/appchan-x.js index be78616cf..e1629be78 100644 --- a/builds/appchan-x.js +++ b/builds/appchan-x.js @@ -14115,8 +14115,10 @@ if (g.VIEW === 'thread') { g.THREADID = +pathname[3]; } - if (['b', 'd', 'e', 'gif', 'h', 'hc', 'hm', 'hr', 'pol', 'r', 'r9k', 'rs', 's', 'soc', 't', 'u', 'y'].contains(g.BOARD)) { + if (['b', 'd', 'e', 'gif', 'h', 'hc', 'hm', 'hr', 'pol', 'r', 'r9k', 'rs', 's', 'soc', 't', 'u', 'y'].contains(g.BOARD.ID)) { g.TYPE = 'nsfw'; + } else { + g.TYPE = 'sfw'; } $.extend(Themes, Conf["userThemes"]); $.extend(Mascots, Conf["userMascots"]); diff --git a/builds/appchan-x.user.js b/builds/appchan-x.user.js index 54855fd1e..cffb370d9 100644 --- a/builds/appchan-x.user.js +++ b/builds/appchan-x.user.js @@ -14134,8 +14134,10 @@ if (g.VIEW === 'thread') { g.THREADID = +pathname[3]; } - if (['b', 'd', 'e', 'gif', 'h', 'hc', 'hm', 'hr', 'pol', 'r', 'r9k', 'rs', 's', 'soc', 't', 'u', 'y'].contains(g.BOARD)) { + if (['b', 'd', 'e', 'gif', 'h', 'hc', 'hm', 'hr', 'pol', 'r', 'r9k', 'rs', 's', 'soc', 't', 'u', 'y'].contains(g.BOARD.ID)) { g.TYPE = 'nsfw'; + } else { + g.TYPE = 'sfw'; } $.extend(Themes, Conf["userThemes"]); $.extend(Mascots, Conf["userMascots"]); diff --git a/builds/crx/script.js b/builds/crx/script.js index 883e31a45..126944920 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -14118,8 +14118,10 @@ if (g.VIEW === 'thread') { g.THREADID = +pathname[3]; } - if (['b', 'd', 'e', 'gif', 'h', 'hc', 'hm', 'hr', 'pol', 'r', 'r9k', 'rs', 's', 'soc', 't', 'u', 'y'].contains(g.BOARD)) { + if (['b', 'd', 'e', 'gif', 'h', 'hc', 'hm', 'hr', 'pol', 'r', 'r9k', 'rs', 's', 'soc', 't', 'u', 'y'].contains(g.BOARD.ID)) { g.TYPE = 'nsfw'; + } else { + g.TYPE = 'sfw'; } $.extend(Themes, Conf["userThemes"]); $.extend(Mascots, Conf["userMascots"]); diff --git a/src/General/Main.coffee b/src/General/Main.coffee index f6c06e9be..8318b98a1 100644 --- a/src/General/Main.coffee +++ b/src/General/Main.coffee @@ -44,8 +44,10 @@ Main = g.THREADID = +pathname[3] # Check if the current board we're on is SFW or not, so we can handle options that need to know that. - if ['b', 'd', 'e', 'gif', 'h', 'hc', 'hm', 'hr', 'pol', 'r', 'r9k', 'rs', 's', 'soc', 't', 'u', 'y'].contains g.BOARD + if ['b', 'd', 'e', 'gif', 'h', 'hc', 'hm', 'hr', 'pol', 'r', 'r9k', 'rs', 's', 'soc', 't', 'u', 'y'].contains g.BOARD.ID g.TYPE = 'nsfw' + else + g.TYPE = 'sfw' $.extend Themes, Conf["userThemes"] $.extend Mascots, Conf["userMascots"]