REFACTOR: Remove `Discourse.SiteSettings` from initializers

REFACTOR: Remove Discourse.SiteSettings from initializers

diff --git a/app/assets/javascripts/discourse/app/initializers/ensure-max-image-dimensions.js b/app/assets/javascripts/discourse/app/initializers/ensure-max-image-dimensions.js
index 1712e54..ac6fdd8 100644
--- a/app/assets/javascripts/discourse/app/initializers/ensure-max-image-dimensions.js
+++ b/app/assets/javascripts/discourse/app/initializers/ensure-max-image-dimensions.js
@@ -10,8 +10,9 @@ export default {
     // for mobile we use the window width as a safeguard
     // This rule should never really be at play unless for some reason images do not have dimensions
 
-    var width = Discourse.SiteSettings.max_image_width;
-    var height = Discourse.SiteSettings.max_image_height;
+    const siteSettings = container.lookup("site-settings:main");
+    let width = siteSettings.max_image_width;
+    let height = siteSettings.max_image_height;
 
     const site = container.lookup("site:main");
     if (site.mobileView) {
diff --git a/app/assets/javascripts/discourse/app/initializers/sharing-sources.js b/app/assets/javascripts/discourse/app/initializers/sharing-sources.js
index bb0fd89..b5af61d 100644
--- a/app/assets/javascripts/discourse/app/initializers/sharing-sources.js
+++ b/app/assets/javascripts/discourse/app/initializers/sharing-sources.js
@@ -45,9 +45,7 @@ export default {
         const body = quote ? `${quote} \n\n ${link}` : link;
         return (
           "mailto:?to=&subject=" +
-          encodeURIComponent(
-            "[" + Discourse.SiteSettings.title + "] " + title
-          ) +
+          encodeURIComponent("[" + siteSettings.title + "] " + title) +
           "&body=" +
           encodeURIComponent(body)
         );

GitHub sha: fa74f28a

This commit appears in #10280 which was merged by eviltrout.