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;