From 02ee0b8fae007fb09f8e96e6394cb5d2807183f6 Mon Sep 17 00:00:00 2001 From: Kerrick Long Date: Thu, 21 Jul 2011 18:33:35 -0500 Subject: [PATCH] terenary operator --- js/common.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/js/common.js b/js/common.js index da33715..0a6a93d 100644 --- a/js/common.js +++ b/js/common.js @@ -318,11 +318,7 @@ button = new BrowserAction(); * @constructor */ function RedditAPI(domain) { - if (domain) { - this.domain = domain; - } else { - this.domain = 'www.reddit.com'; - } + this.domain = domain ? domain : 'www.reddit.com'; this.commentsMatchPattern = new RegExp('https?:\/\/' + utils.regexEscape(this.domain) + '(\/r\/(.+?))?\/comments\/(.+?)\/.*'); return true; }