<commit_before>/*global Framework7, Dom7, Template7, routes */

(function (Framework7, $$, T7, routes) {
    'use strict';

    // Template7 helpers
    T7.registerHelper('pluralize', function (arr, options) {
        if (!arr) return '';
        if (typeof arr === "number") return (arr < 2) ? options.hash.single : options.hash.multiple;
        return (arr.length === 1) ? options.hash.single : arr.length + " " + options.hash.multiple;
    });
    // Template 7 Register partial
    T7.registerPartial(
        'comments',
        '{{#each comments}}' +
            '<div class="message message-first message-last message-tail{{#js_if "@index%2 === 0"}} message-sent{{else}} message-received{{/js_if}}">' +
                '<div class="message-content">' +
                    '<div class="message-name">{{user}}, {{time_ago}}</div>' +
                    '<div class="message-bubble">' +
                        '<div class="message-text">{{content}}</div>' +
                    '</div>' +
                '</div>' +
            '</div>' +
            '{{#if comments}}{{> "comments"}}{{/if}}' +
        '{{/each}}'
    );

    var app, mainView;

    // Init App
    app = new Framework7({
        root: '#app', // App root element
        id: 'io.framework7.hackernews7', // App bundle ID
        name: 'HackerNews7', // App name
        theme: 'auto', // Automatic theme detection
        routes: routes, // App routes
        data() {
            return {
                apiUrl: "https://api.hnpwa.com/v0/",
                api: null
            }
        },
        methods: {
            fetchAPI() {
                var self = this;
                self.request.json(self.data.apiUrl, (api) => {
                    self.data.api = api
                })
            }
        }
    });

    // Add Right/Main View
    mainView = app.views.create('.view-main', {
        url: '/'
    });

    // Export app to global
    window.app = app;

}(Framework7, Dom7, Template7, routes));<commit_msg>extrernal link access<commit_after>/*global Framework7, Dom7, Template7, routes */

(function (Framework7, $$, T7, routes) {
    'use strict';

    // Template7 helpers
    T7.registerHelper('pluralize', function (arr, options) {
        if (!arr) return '';
        if (typeof arr === "number") return (arr < 2) ? options.hash.single : options.hash.multiple;
        return (arr.length === 1) ? options.hash.single : arr.length + " " + options.hash.multiple;
    });
    // Template 7 Register partial
    T7.registerPartial(
        'comments',
        '{{#each comments}}' +
            '<div class="message message-first message-last message-tail{{#js_if "@index%2 === 0"}} message-sent{{else}} message-received{{/js_if}}">' +
                '<div class="message-content">' +
                    '<div class="message-name">{{user}}, {{time_ago}}</div>' +
                    '<div class="message-bubble">' +
                        '<div class="message-text">{{content}}</div>' +
                    '</div>' +
                '</div>' +
            '</div>' +
            '{{#if comments}}{{> "comments"}}{{/if}}' +
        '{{/each}}'
    );

    var app, mainView;

    // Init App
    app = new Framework7({
        root: '#app', // App root element
        id: 'io.framework7.hackernews7', // App bundle ID
        name: 'HackerNews7', // App name
        theme: 'auto', // Automatic theme detection
        clicks: {
            externalLinks: '.external, .message a', //external links also in comments
        },
        routes: routes, // App routes
        data() {
            return {
                apiUrl: "https://api.hnpwa.com/v0/",
                api: null
            }
        },
        methods: {
            fetchAPI() {
                var self = this;
                self.request.json(self.data.apiUrl, (api) => {
                    self.data.api = api
                })
            }
        }
    });

    // Add Right/Main View
    mainView = app.views.create('.view-main', {
        url: '/'
    });

    // Export app to global
    window.app = app;

}(Framework7, Dom7, Template7, routes));
{'fraction_non_alphanumeric': 0.17049576783555018, 'fraction_numerical': 0.010157194679564692, 'mean_word_length': 1.642811501597444, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 27, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5645344', 'n_tokens_mistral': 1232, 'n_tokens_neox': 1187, 'n_words': 271}