templates/website/includes/integrations-script-footer.html.twig line 1

Open in your IDE?
  1. {{ getScript('freshchat_script', nonceHash)|raw }}
  2. <!-- JIVOCHAT -->
  3. {% if checkConfigHasScript('jivochat_script') %}
  4.     {{ getScript('jivochat_script', nonceHash)|raw }}
  5. {% elseif getConfig('jivochat_script') %}
  6.     <script nonce="{{ nonceHash }}" src="//code.jivosite.com/widget/{{ getConfig('livechat_script') }}" async></script>
  7. {% endif %}
  8. <!-- LIVECHAT -->
  9. {% if checkConfigHasScript('livechat_script') %}
  10.     {{ getScript('livechat_script', nonceHash)|raw }}
  11. {% elseif getConfig('livechat_script') %}
  12.     <script nonce="{{ nonceHash }}">
  13.         window.__lc = window.__lc || {};
  14.         window.__lc.license = '{{ getConfig('livechat_script') }}';
  15.         window.__lc.integration_name = "manual_onboarding";
  16.         window.__lc.product_name = "livechat";
  17.         ;(function(n,t,c){function i(n){return e._h?e._h.apply(null,n):e._q.push(n)}var e={_q:[],_h:null,_v:"2.0",on:function(){i(["on",c.call(arguments)])},once:function(){i(["once",c.call(arguments)])},off:function(){i(["off",c.call(arguments)])},get:function(){if(!e._h)throw new Error("[LiveChatWidget] You can't use getters before load.");return i(["get",c.call(arguments)])},call:function(){i(["call",c.call(arguments)])},init:function(){var n=t.createElement("script");n.async=!0,n.type="text/javascript",n.src="https://cdn.livechatinc.com/tracking.js",t.head.appendChild(n)}};!n.__lc.asyncInit&&e.init(),n.LiveChatWidget=n.LiveChatWidget||e}(window,document,[].slice))
  18.     </script>
  19. {% endif %}
  20. <!-- CALLPAGE -->
  21. {% if checkConfigHasScript('callpage_script') %}
  22.     {{ getScript('callpage_script', nonceHash)|raw }}
  23. {% elseif getConfig('callpage_script') %}
  24.     <script nonce="{{ nonceHash }}">var loadBabel = function(url, callback) {var script = document.createElement('script');script.async = true;if (script.readyState) {script.onreadystatechange = function() {if (script.readyState == 'loaded' || script.readyState == 'complete') {script.onreadystatechange = null;callback(window, document);}};} else {script.onload = function() {callback(window, document);};}script.src = url;document.head.appendChild(script);};var getCookie = function(cname) {var objToday = new Date();var version = objToday.toISOString().split('T')[0].split('-').join('');var name = cname + '=';var decodedCookie = decodeURIComponent(document.cookie);var cookieArray = decodedCookie.split(';');for (var i = 0; i < cookieArray.length; i++) {var cookie = cookieArray[i];cookie = cookie.trim();if (cookie.indexOf(name) == 0) {return cookie.substring(name.length, cookie.length);}}return version;};var loadWidget = function(window, document) {var __cp = {id:'{{ getConfig('callpage_script') }}',version:1.1};var cp = document.createElement('script');cp.type = 'text/javascript';cp.async = true;cp.src = ++cdn-widget.callpage.io+build+js+callpage.js.replace(/[+]/g, '/').replace(/[=]/g, '.') + '?v=' + getCookie('callpage-widget-version');var s = document.getElementsByTagName('script')[0];s.parentNode.insertBefore(cp, s);if (window.callpage) {alert('You could have only 1 CallPage code on your website!');} else {window.callpage = function(method) {if (method == '__getQueue') {return this.methods;} else if (method) {if (typeof window.callpage.execute === 'function') {return window.callpage.execute.apply(this, arguments);} else {(this.methods = this.methods || []).push({arguments: arguments,});}}};window.callpage.__cp = __cp;window.callpage('api.button.autoshow');}};loadBabel('https://cdnjs.cloudflare.com/ajax/libs/babel-polyfill/6.26.0/polyfill.min.js', function() {return loadWidget(window, document);});</script>
  25. {% endif %}