<commit_before>var nodeApiUrl = window.contextVars.node.urls.api;

var FileRenderer = require('../filerenderer.js');
var FileRevisions = require('../fileRevisions.js');

if (window.contextVars.renderURL !== undefined) {
    FileRenderer.start(window.contextVars.renderURL, '#fileRendered');
}

new FileRevisions(
    '#fileRevisions',
    window.contextVars.node,
    window.contextVars.file,
    window.contextVars.currentUser.canEdit
);<commit_msg>Wrap FileRevisions init in document.ready<commit_after>var nodeApiUrl = window.contextVars.node.urls.api;

var FileRenderer = require('../filerenderer.js');
var FileRevisions = require('../fileRevisions.js');

if (window.contextVars.renderURL !== undefined) {
    FileRenderer.start(window.contextVars.renderURL, '#fileRendered');
}

$(document).ready(function() {
    new FileRevisions(
        '#fileRevisions',
        window.contextVars.node,
        window.contextVars.file,
        window.contextVars.currentUser.canEdit
    );
});
{'fraction_non_alphanumeric': 0.14184397163120568, 'fraction_numerical': 0.0, 'mean_word_length': 4.488888888888889, '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': '5551788', 'n_tokens_mistral': 296, 'n_tokens_neox': 311, 'n_words': 45}