Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type="text/javascript">
- window.__lc = window.__lc || {};
- window.__lc.license = 'licence_number';
- function strip_tags(input, allowed) {
- allowed = (((allowed || '') + '')
- .toLowerCase()
- .match(/<[a-z][a-z0-9]*>/g) || [])
- .join(''); // making sure the allowed arg is a string containing only tags in lowercase (<a><b><c>)
- var tags = /<\/?([a-z][a-z0-9]*)\b[^>]*>/gi,
- commentsAndPhpTags = /<!--[\s\S]*?-->|<\?(?:php)?[\s\S]*?\?>/gi;
- return input.replace(commentsAndPhpTags, '')
- .replace(tags, function($0, $1) {
- return allowed.indexOf('<' + $1.toLowerCase() + '>') > -1 ? $0 : '';
- });
- };
- var totalPrice = strip_tags('{{ cart.total_price | money }}');
- window.__lc.params = [
- { name: 'Cart', value: totalPrice },
- { name: 'Order number', value: '{{ order.order_number }}' }
- ];
- (function() {
- var lc = document.createElement('script'); lc.type = 'text/javascript'; lc.async = true;
- lc.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'cdn.livechatinc.com/tracking.js';
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(lc, s);
- })();
- </script>
Add Comment
Please, Sign In to add comment