diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 3a94fe59bdf..fe60409f75b 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -284,9 +284,10 @@ class ApplicationController < ActionController::Base end def custom_html_json + target = view_context.mobile_view? ? :mobile : :desktop data = { - top: SiteCustomization.custom_top(session[:preview_style]), - footer: SiteCustomization.custom_footer(session[:preview_style]) + top: SiteCustomization.custom_top(session[:preview_style], target), + footer: SiteCustomization.custom_footer(session[:preview_style], target) } if DiscoursePluginRegistry.custom_html