Make eslint happy.
This commit is contained in:
parent
4c67340edd
commit
79d1e87dee
|
@ -6,35 +6,25 @@ var user_input = '';
|
|||
var user_input_mobile = '';
|
||||
var currentUser = Discourse.User.current();
|
||||
|
||||
function splitWidthInt(value) {
|
||||
var str = value.substring(0, 3);
|
||||
return str.trim();
|
||||
}
|
||||
|
||||
function splitHeightInt(value) {
|
||||
var str = value.substring(0, 3);
|
||||
return str.trim();
|
||||
}
|
||||
|
||||
var data = {
|
||||
"topic-list-top" : {},
|
||||
"topic-above-post-stream" : {},
|
||||
"topic-above-suggested" : {},
|
||||
"post-bottom" : {}
|
||||
}
|
||||
"post-bottom" : {}
|
||||
};
|
||||
|
||||
|
||||
if (!Discourse.Mobile.mobileView && Discourse.SiteSettings.amazon_topic_list_top_src_code) {
|
||||
data["topic-list-top"]["user_input"] = Discourse.SiteSettings.amazon_topic_list_top_src_code;
|
||||
data["topic-list-top"]["amazon_width"] = parseInt(Discourse.SiteSettings.amazon_topic_list_top_ad_width_code);
|
||||
data["topic-list-top"]["amazon_height"] = parseInt(Discourse.SiteSettings.amazon_topic_list_top_ad_height_code);
|
||||
}
|
||||
}
|
||||
|
||||
if (Discourse.Mobile.mobileView && Discourse.SiteSettings.amazon_mobile_topic_list_top_src_code) {
|
||||
data["topic-list-top"]["user_input_mobile"] = Discourse.SiteSettings.amazon_mobile_topic_list_top_src_code;
|
||||
data["topic-list-top"]["mobile_amazon_width"] = parseInt(Discourse.SiteSettings.amazon_mobile_topic_list_top_ad_width_code);
|
||||
data["topic-list-top"]["mobile_amazon_height"] = parseInt(Discourse.SiteSettings.amazon_mobile_topic_list_top_ad_height_code);
|
||||
}
|
||||
}
|
||||
|
||||
if (!Discourse.Mobile.mobileView && Discourse.SiteSettings.amazon_topic_above_post_stream_src_code) {
|
||||
data["topic-above-post-stream"]["user_input"] = Discourse.SiteSettings.amazon_topic_above_post_stream_src_code;
|
||||
|
@ -46,7 +36,7 @@ if (Discourse.Mobile.mobileView && Discourse.SiteSettings.amazon_mobile_topic_ab
|
|||
data["topic-above-post-stream"]["user_input_mobile"] = Discourse.SiteSettings.amazon_mobile_topic_above_post_stream_src_code;
|
||||
data["topic-above-post-stream"]["mobile_amazon_width"] = parseInt(Discourse.SiteSettings.amazon_mobile_topic_above_post_stream_ad_width_code);
|
||||
data["topic-above-post-stream"]["mobile_amazon_height"] = parseInt(Discourse.SiteSettings.amazon_mobile_topic_above_post_stream_ad_height_code);
|
||||
}
|
||||
}
|
||||
|
||||
if (!Discourse.Mobile.mobileView && Discourse.SiteSettings.amazon_topic_above_suggested_src_code) {
|
||||
data["topic-above-suggested"]["user_input"] = Discourse.SiteSettings.amazon_topic_above_suggested_src_code;
|
||||
|
@ -58,7 +48,7 @@ if (Discourse.Mobile.mobileView && Discourse.SiteSettings.amazon_mobile_topic_ab
|
|||
data["topic-above-suggested"]["user_input_mobile"] = Discourse.SiteSettings.amazon_mobile_topic_above_suggested_src_code;
|
||||
data["topic-above-suggested"]["mobile_amazon_width"] = parseInt(Discourse.SiteSettings.amazon_mobile_topic_above_suggested_ad_width_code);
|
||||
data["topic-above-suggested"]["mobile_amazon_height"] = parseInt(Discourse.SiteSettings.amazon_mobile_topic_above_suggested_ad_height_code);
|
||||
}
|
||||
}
|
||||
|
||||
if (!Discourse.Mobile.mobileView && Discourse.SiteSettings.amazon_post_bottom_src_code) {
|
||||
data["post-bottom"]["user_input"] = Discourse.SiteSettings.amazon_post_bottom_src_code;
|
||||
|
@ -117,4 +107,4 @@ export default Ember.Component.extend({
|
|||
return !((currentUser) && (currentUser.get('trust_level') > Discourse.SiteSettings.amazon_through_trust_level));
|
||||
}.property('trust_level'),
|
||||
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue