<commit_before>{% extends "master.html" %}

{% block title %}SVG Tree Viewer - PhyloCommons{% endblock %}

{% block head %}
    <link rel="stylesheet" href="/static/treelib.css" type="text/css" />
    <script type="text/javascript" src="/static/jquery-svgpan.js" ></script> 
    <script type="text/javascript" src="/static/treelib.js"></script> 
{% endblock %}

{% block nav-trees %}class="active"{% endblock %}

{% block leftmenu %}
{% include "tree_menu.html" %}
{% endblock %}

{% block content %}

{% include "treelib_widget.html" %}

<p id='message' class='muted'></p>

<input type="hidden" name="newick" id="newick" value=""/>
<input type="hidden" name="tree_src_url" id="tree_src_url" value="{{tree_src}}"/>

<script type="text/javascript">
    $(document).ready(function() {
        $('#message').empty();
        $('#message').append('<p>Loading tree...</p>');
        $('img#loading').show();
        
        $.ajax({
            type: "GET",
            url: $('#tree_src_url').val(),
            success: function(data) {
                $('#message').empty();
                $('#newick').val(data);
                $('img#loading').hide();
                $('div#treelib-widget').show();
                try {
                    draw_tree('newick', 'circle');
                } catch(e) {
                    $('#message').append('<p class='error'>Error: ' + e.message + '</p>');
                }
                $('#message').append('<a href="data:text/plaintext,' + 
                                     data + //encodeURIComponent(data) + 
                                     '">Click to download in Newick format</a>'
                                     );
            },
            error: function(msg) {
                $('#message').empty();
                $('#message').append("<a>Couldn't load tree. Click here to try again.</a>");
            }
        });
    });
</script>

{% endblock %}<commit_msg>Fixing JS syntax error.<commit_after>{% extends "master.html" %}

{% block title %}SVG Tree Viewer - PhyloCommons{% endblock %}

{% block head %}
    <link rel="stylesheet" href="/static/treelib.css" type="text/css" />
    <script type="text/javascript" src="/static/jquery-svgpan.js" ></script> 
    <script type="text/javascript" src="/static/treelib.js"></script> 
{% endblock %}

{% block nav-trees %}class="active"{% endblock %}

{% block leftmenu %}
{% include "tree_menu.html" %}
{% endblock %}

{% block content %}

{% include "treelib_widget.html" %}

<p id='message' class='muted'></p>

<input type="hidden" name="newick" id="newick" value=""/>
<input type="hidden" name="tree_src_url" id="tree_src_url" value="{{tree_src}}"/>

<script type="text/javascript">
    $(document).ready(function() {
        $('#message').empty();
        $('#message').append('<p>Loading tree...</p>');
        $('img#loading').show();
        
        $.ajax({
            type: "GET",
            url: $('#tree_src_url').val(),
            success: function(data) {
                $('#message').empty();
                $('#newick').val(data);
                $('img#loading').hide();
                $('div#treelib-widget').show();
                try {
                    draw_tree('newick', 'circle');
                } catch(e) {
                    $('#message').append("<p class='error'>Error: " + e.message + '</p>');
                }
                $('#message').append('<a href="data:text/plaintext,' + 
                                     data + //encodeURIComponent(data) + 
                                     '">Click to download in Newick format</a>'
                                     );
            },
            error: function(msg) {
                $('#message').empty();
                $('#message').append("<a>Couldn't load tree. Click here to try again.</a>");
            }
        });
    });
</script>

{% endblock %}
{'fraction_non_alphanumeric': 0.20510835913312694, 'fraction_numerical': 0.0, 'mean_word_length': 1.9304610733182161, 'pattern_counts': {'":': 0, '<': 41, '<?xml version=': 0, '>': 41, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4716456', 'n_tokens_mistral': 1173, 'n_tokens_neox': 1102, 'n_words': 201}