<commit_before>var page = require('page');
var model = require('./model')();
var attachFastClick = require('fastclick');
var UA = require('./ua');
var analytics = require('./analytics');
var fastclick;

module.exports = function (app) {
    // Track history for session restoration
    page(function (ctx, next) {
        if (!model._ready) return next();
        model.data.session.path = ctx.path;
        if (!UA.isFirefoxOS) {
            if (fastclick) fastclick.destroy();
            fastclick = attachFastClick(document.body);
        }
        analytics.screenView({screenName: ctx.canonicalPath});
        document.querySelector('#app').scrollTop = 0;
        next();
    });

    page('/healthcheck', function () {
        app.$data.isReady = true;
        app.currentView = 'healthcheck';<commit_msg>force close shim on navigation change<commit_after>var page = require('page');
var model = require('./model')();
var attachFastClick = require('fastclick');
var UA = require('./ua');
var analytics = require('./analytics');
var fastclick;

module.exports = function (app) {
    // Track history for session restoration
    page(function (ctx, next) {
        if (!model._ready) return next();
        model.data.session.path = ctx.path;
        if (!UA.isFirefoxOS) {
            if (fastclick) fastclick.destroy();
            fastclick = attachFastClick(document.body);
        }
        analytics.screenView({screenName: ctx.canonicalPath});
        document.querySelector('#app').scrollTop = 0;
        app.$broadcast('closeShim');
        app.$broadcast('closeModalPrompt');
        next();
    });

    page('/healthcheck', function () {
        app.$data.isReady = true;
        app.currentView = 'healthcheck';
{'fraction_non_alphanumeric': 0.15268941584731058, 'fraction_numerical': 0.001156737998843262, 'mean_word_length': 2.8963963963963963, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '3545462', 'n_tokens_mistral': 476, 'n_tokens_neox': 473, 'n_words': 110}