<commit_before>const m = require('mithril');

m.route(document.getElementById('spec-viewer'), '/', {
    '/about': require('./about.js'),
    '/:parts...': require('./spec-viewer.js'),
});
m.mount(document.getElementById('part-selector'), require('./part-selector.js'));<commit_msg>part selector extended by default on mobile if no parts are selected<commit_after>const m = require('mithril');
const hash = require('./hash.js');

m.route(document.getElementById('spec-viewer'), '/', {
    '/about': require('./about.js'),
    '/:parts...': require('./spec-viewer.js'),
});
m.mount(document.getElementById('part-selector'), require('./part-selector.js'));

// extend part selector if no parts are selected on mobile
if(hash.getList().length === 0) {
    document.getElementById('mobile-toggle').checked = true;
}
{'fraction_non_alphanumeric': 0.22071516646115907, 'fraction_numerical': 0.0012330456226880395, 'mean_word_length': 4.8, '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': '3898297', 'n_tokens_mistral': 235, 'n_tokens_neox': 231, 'n_words': 47}