From 1273dea8edf8452bc1fbb744c76f3c497305cc6d Mon Sep 17 00:00:00 2001 From: rishabh Date: Tue, 15 Jul 2025 10:09:39 +0530 Subject: [PATCH] added option to disable support widget --- clientside/boot.py | 3 ++- clientside/public/js/support_widget.js | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/clientside/boot.py b/clientside/boot.py index b487d7d..6a75dcd 100644 --- a/clientside/boot.py +++ b/clientside/boot.py @@ -21,4 +21,5 @@ def extend_bootinfo(bootinfo): bootinfo.subscription_expired = True bootinfo.chat_widget_base_url = frappe.conf.chat_widget_base_url - bootinfo.chat_widget_token = frappe.conf.chat_widget_token \ No newline at end of file + bootinfo.chat_widget_token = frappe.conf.chat_widget_token + bootinfo.chat_widget_disabled = frappe.conf.chat_widget_disabled \ No newline at end of file diff --git a/clientside/public/js/support_widget.js b/clientside/public/js/support_widget.js index 6990abe..173b2da 100644 --- a/clientside/public/js/support_widget.js +++ b/clientside/public/js/support_widget.js @@ -1,7 +1,9 @@ $(document).ready(function () { const baseUrl = frappe.boot.chat_widget_base_url; const token = frappe.boot.chat_widget_token; + const disabled = frappe.boot.chat_widget_disabled; if (!token || !baseUrl) return; + if (disabled) return; (function(d, t) { var BASE_URL = baseUrl;