Skip to content

Commit dd747c2

Browse files
authored
Merge pull request #7 from qkdreyer/patch-1
chore: inject nonce
2 parents 88a5f9d + 2105d52 commit dd747c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Resources/views/olark.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{% if rg_olark_id()|length %}
2-
<script>
2+
<script nonce="NGINX_CSP_NONCE">
33
window.olark||(function(k){var g=window,j=document,a=g.location.protocol=="https:"?"https:":"http:",i=k.name,b="load",h="addEventListener";(function(){g[i]=function(){(c.s=c.s||[]).push(arguments)};var c=g[i]._={},f=k.methods.length;while(f--){(function(l){g[i][l]=function(){g[i]("call",l,arguments)}})(k.methods[f])}c.l=k.loader;c.i=arguments.callee;c.p={0:+new Date};c.P=function(l){c.p[l]=new Date-c.p[0]};function e(){c.P(b);g[i](b)}g[h]?g[h](b,e,false):g.attachEvent("on"+b,e);c.P(1);var d=j.createElement("script"),m=document.getElementsByTagName("script")[0];d.type="text/javascript";d.async=true;d.src=a+"//"+c.l;m.parentNode.insertBefore(d,m);c.P(2)})()})({loader:(function(a){return "static.olark.com/jsclient/loader1.js?ts="+(a?a[1]:(+new Date))})(document.cookie.match(/olarkld=([0-9]+)/)),name:"olark",methods:["configure","extend","declare","identify"]}); olark.identify('{{ rg_olark_id() }}');
44
{% if rg_olark_option("name")|length %}
55
olark('api.chat.updateVisitorNickname', { snippet: "{{ rg_olark_option("name") }}" });

0 commit comments

Comments
 (0)