FIX: Plugin was broken in stable

This commit is contained in:
Robin Ward 2020-06-25 14:51:14 -04:00
parent cff1459dbc
commit 05967a8d52
1 changed files with 10 additions and 8 deletions

View File

@ -8,8 +8,10 @@ const data = {
"post-bottom": {} "post-bottom": {}
}; };
let mobileView = Discourse.Site.currentProp('mobileView');
if ( if (
!Discourse.Mobile.mobileView && !mobileView &&
Discourse.SiteSettings.amazon_topic_list_top_src_code Discourse.SiteSettings.amazon_topic_list_top_src_code
) { ) {
data["topic-list-top"]["user_input"] = data["topic-list-top"]["user_input"] =
@ -25,7 +27,7 @@ if (
} }
if ( if (
Discourse.Mobile.mobileView && mobileView &&
Discourse.SiteSettings.amazon_mobile_topic_list_top_src_code Discourse.SiteSettings.amazon_mobile_topic_list_top_src_code
) { ) {
data["topic-list-top"]["user_input_mobile"] = data["topic-list-top"]["user_input_mobile"] =
@ -41,7 +43,7 @@ if (
} }
if ( if (
!Discourse.Mobile.mobileView && !mobileView &&
Discourse.SiteSettings.amazon_topic_above_post_stream_src_code Discourse.SiteSettings.amazon_topic_above_post_stream_src_code
) { ) {
data["topic-above-post-stream"]["user_input"] = data["topic-above-post-stream"]["user_input"] =
@ -57,7 +59,7 @@ if (
} }
if ( if (
Discourse.Mobile.mobileView && mobileView &&
Discourse.SiteSettings.amazon_mobile_topic_above_post_stream_src_code Discourse.SiteSettings.amazon_mobile_topic_above_post_stream_src_code
) { ) {
data["topic-above-post-stream"]["user_input_mobile"] = data["topic-above-post-stream"]["user_input_mobile"] =
@ -73,7 +75,7 @@ if (
} }
if ( if (
!Discourse.Mobile.mobileView && !mobileView &&
Discourse.SiteSettings.amazon_topic_above_suggested_src_code Discourse.SiteSettings.amazon_topic_above_suggested_src_code
) { ) {
data["topic-above-suggested"]["user_input"] = data["topic-above-suggested"]["user_input"] =
@ -89,7 +91,7 @@ if (
} }
if ( if (
Discourse.Mobile.mobileView && mobileView &&
Discourse.SiteSettings.amazon_mobile_topic_above_suggested_src_code Discourse.SiteSettings.amazon_mobile_topic_above_suggested_src_code
) { ) {
data["topic-above-suggested"]["user_input_mobile"] = data["topic-above-suggested"]["user_input_mobile"] =
@ -105,7 +107,7 @@ if (
} }
if ( if (
!Discourse.Mobile.mobileView && !mobileView &&
Discourse.SiteSettings.amazon_post_bottom_src_code Discourse.SiteSettings.amazon_post_bottom_src_code
) { ) {
data["post-bottom"]["user_input"] = data["post-bottom"]["user_input"] =
@ -121,7 +123,7 @@ if (
} }
if ( if (
Discourse.Mobile.mobileView && mobileView &&
Discourse.SiteSettings.amazon_mobile_post_bottom_src_code Discourse.SiteSettings.amazon_mobile_post_bottom_src_code
) { ) {
data["post-bottom"]["user_input_mobile"] = data["post-bottom"]["user_input_mobile"] =