From e3bd122e29b2b9a3e79b2632ba241785ffb206c4 Mon Sep 17 00:00:00 2001 From: Jay Pfaffman Date: Thu, 14 Dec 2023 10:56:10 -0500 Subject: [PATCH] remove console logging --- .../discourse/initializers/custom-homepage-set.js.es6 | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/javascripts/discourse/initializers/custom-homepage-set.js.es6 b/javascripts/discourse/initializers/custom-homepage-set.js.es6 index 8593987..b9e9e2e 100644 --- a/javascripts/discourse/initializers/custom-homepage-set.js.es6 +++ b/javascripts/discourse/initializers/custom-homepage-set.js.es6 @@ -4,14 +4,12 @@ import PreloadStore from "discourse/lib/preload-store"; export default { name: "discourse-custom-homepage", - initialize(container) { + initialize() { withPluginApi("0.11.4", (api) => { - const router = container.lookup("router:main"); + // const router = container.lookup("router:main"); const user = api.getCurrentUser(); const { setDefaultHomepage } = require("discourse/lib/utilities"); - window.console.log("checking default"); - if (settings.custom_default_homepage) { const url = settings.custom_default_homepage.replace(/^\/+/g, ''); setDefaultHomepage(url); @@ -32,7 +30,7 @@ export default { if (user) { if (user.primary_group_name && settings.group_page_map) { - var groupMap = settings.group_page_map.replace(",", ":").split("|"); + let groupMap = settings.group_page_map.replace(",", ":").split("|"); const mapEntry = groupMap.find((value) => RegExp(user.primary_group_name).test(value) );