diff options
Diffstat (limited to 'addons/im_livechat/static/src/js/ajax_external.js')
| -rw-r--r-- | addons/im_livechat/static/src/js/ajax_external.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/addons/im_livechat/static/src/js/ajax_external.js b/addons/im_livechat/static/src/js/ajax_external.js new file mode 100644 index 00000000..9c6bd4cd --- /dev/null +++ b/addons/im_livechat/static/src/js/ajax_external.js @@ -0,0 +1,14 @@ +odoo.define('web.ajax_external', function (require) { +"use strict"; + +var ajax = require('web.ajax'); + +/** + * This file should be used in the context of an external widget loading (e.g: live chat in a non-Odoo website) + * It overrides the 'loadJS' method that is supposed to load additional scripts, based on a relative URL (e.g: '/web/webclient/locale/en_US') + * As we're not in an Odoo website context, the calls will not work, and we avoid a 404 request. + */ +ajax.loadJS = function (url) { + console.warn('Tried to load the following script on an external website: ' + url); +}; +}); |
