terenary operator

This commit is contained in:
Kerrick Long
2011-07-21 18:33:35 -05:00
parent 1bf32d8e51
commit 02ee0b8fae
+1 -5
View File
@@ -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;
}