Sha256: 04bdadf1e0d4ac213dfd6e2ca225936c6e0b7d1d252b76601f3da9fbedaffa28

Contents?: true

Size: 716 Bytes

Versions: 3

Compression:

Stored size: 716 Bytes

Contents

<script>
    <%
        agent_host = Tml.config.agent[:host] || 'https://cdn.translationexchange.com/tools/agent/' + (Tml.config.agent[:version] || 'stable') + '/agent.min.js'
    %>
    (function() {
        var script = window.document.createElement('script');
        script.setAttribute('id', 'tml-agent');
        script.setAttribute('type', 'application/javascript');
        script.setAttribute('src', '<%= agent_host %>');
        script.setAttribute('charset', 'UTF-8');
        script.onload = function() {
            Trex.init("<%=tml_application.key%>", <%=Tml.config.agent.to_json.html_safe%>);
        };
        window.document.getElementsByTagName('head')[0].appendChild(script);
    })();
</script>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
tml-rails-5.2.1 app/views/tml_rails/tags/_scripts_agent.html.erb
tml-rails-5.1.2 app/views/tml_rails/tags/_scripts_agent.html.erb
tml-rails-5.1.1 app/views/tml_rails/tags/_scripts_agent.html.erb