From e66933ead4fe58ea1a97360236574a4639caa767 Mon Sep 17 00:00:00 2001 From: Penar Musaraj Date: Thu, 31 Mar 2022 09:16:33 -0400 Subject: [PATCH] DEV: Remove chat plugin button (#16342) --- .../initializers/discourse-local-dates.js | 22 ------------------- 1 file changed, 22 deletions(-) diff --git a/plugins/discourse-local-dates/assets/javascripts/initializers/discourse-local-dates.js b/plugins/discourse-local-dates/assets/javascripts/initializers/discourse-local-dates.js index edb003a6a69..5c2aa6a2dfa 100644 --- a/plugins/discourse-local-dates/assets/javascripts/initializers/discourse-local-dates.js +++ b/plugins/discourse-local-dates/assets/javascripts/initializers/discourse-local-dates.js @@ -87,32 +87,10 @@ function _rangeElements(element) { function initializeDiscourseLocalDates(api) { const siteSettings = api.container.lookup("site-settings:main"); - const chat = api.container.lookup("service:chat"); const defaultTitle = I18n.t("discourse_local_dates.default_title", { site_name: siteSettings.title, }); - if (chat) { - chat.addToolbarButton({ - title: "discourse_local_dates.title", - id: "local-dates", - icon: "calendar-alt", - action: "insertDiscourseLocalDate", - }); - - api.modifyClass("component:chat-composer", { - pluginId: "discourse-local-dates", - actions: { - insertDiscourseLocalDate() { - const insertDate = this.addText.bind(this); - showModal("discourse-local-dates-create-modal").setProperties({ - insertDate, - }); - }, - }, - }); - } - api.decorateCookedElement( (elem, helper) => { const dates = elem.querySelectorAll(".discourse-local-date");