<commit_before>(function() {
    function toPage(id) {
      return 'default/' + id.replace(/^#/, '') + '.html';
    }

    function waitForPage(self, page, callback) {
        self.expect(1);

        var intervalId = setInterval(function() {
            if (self.window && self.window.location.href.indexOf(page) >= 0) {
                QUnit.ok(true, page + ' loaded');
                clearTimeout(intervalId);
                callback();
            }
        }, 100);
    }

    dominator.extend('open', function(id, callback) {
        id = toPage(id);
        this.window.location.href = id;
        waitForPage(this, id, callback);
    });
    
    dominator.extend('click', function(selector, callback) {
        var e = document.createEvent('MouseEvents');
        e.initEvent('click', true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);

        var el = this.window.document.querySelector(selector);
        el.dispatchEvent(e);<commit_msg>Fix indentation.<commit_after>(function() {
    function toPage(id) {
        return 'default/' + id.replace(/^#/, '') + '.html';
    }

    function waitForPage(self, page, callback) {
        self.expect(1);

        var intervalId = setInterval(function() {
            if (self.window && self.window.location.href.indexOf(page) >= 0) {
                QUnit.ok(true, page + ' loaded');
                clearTimeout(intervalId);
                callback();
            }
        }, 100);
    }

    dominator.extend('open', function(id, callback) {
        id = toPage(id);
        this.window.location.href = id;
        waitForPage(this, id, callback);
    });
    
    dominator.extend('click', function(selector, callback) {
        var e = document.createEvent('MouseEvents');
        e.initEvent('click', true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);

        var el = this.window.document.querySelector(selector);
        el.dispatchEvent(e);
{'fraction_non_alphanumeric': 0.15514592933947774, 'fraction_numerical': 0.011264720942140297, 'mean_word_length': 2.2191103789126854, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '1517764', 'n_tokens_mistral': 599, 'n_tokens_neox': 566, 'n_words': 120}