<commit_before>// obtained from http://stackoverflow.com/questions/6012163/whats-a-good-alternative-to-html-rewriting/6012345#6012345
// Tribute to  justin.giancola and the s/keyboard/leopard chrome extension.
// Icon and idea are from www.xkcd.com/1288
jQuery.fn.textWalk = function( fn ) {
    this.contents().each( jwalk );
    function jwalk() {
        var node = this.nodeName.toLowerCase();
        if( node === '#text' ) {
            fn.call( this );
        } else if( this.nodeType === 1 && this.childNodes && this.childNodes[0] && node !== 'script' && node !== 'textarea' ) {
            $(this).contents().each( jwalk );
        }
    }
    return this;
};

$('body').textWalk(function(replacements2) {
    //The repetition seems unecessary, but getting regex to work correctly with mixed case
    //was beyond my abilities.
    //Unfortunatly it can't handle dynamic content, but it shouldn't slow down any web pages.
    replacements = [
    ['Keyboard', 'Leopard'],
    ['KEYBOARD', 'LEOPARD'],
    ['keyboard', 'leopard'],
    ['Keyboards', 'Leopards'],
    ['KEYBOARDS', 'LEOPARDS'],
    ['keyboards', 'leopards'],
    ['Witnesses', 'These dudes I know'],
    ['WITNESSES', 'THESE DUDES I KNOW'],
    ['witnesses', 'these dudes I know'],
    ['Allegedly', 'Kinda Probably'],
    ['ALLEGEDLY', 'KINDAPROBABLY'],
    ['allegedly', 'kinda probably'],<commit_msg>witness => this dude I know<commit_after>// obtained from http://stackoverflow.com/questions/6012163/whats-a-good-alternative-to-html-rewriting/6012345#6012345
// Tribute to  justin.giancola and the s/keyboard/leopard chrome extension.
// Icon and idea are from www.xkcd.com/1288
jQuery.fn.textWalk = function( fn ) {
    this.contents().each( jwalk );
    function jwalk() {
        var node = this.nodeName.toLowerCase();
        if( node === '#text' ) {
            fn.call( this );
        } else if( this.nodeType === 1 && this.childNodes && this.childNodes[0] && node !== 'script' && node !== 'textarea' ) {
            $(this).contents().each( jwalk );
        }
    }
    return this;
};

$('body').textWalk(function(replacements2) {
    //The repetition seems unecessary, but getting regex to work correctly with mixed case
    //was beyond my abilities.
    //Unfortunatly it can't handle dynamic content, but it shouldn't slow down any web pages.
    replacements = [
    ['Keyboard', 'Leopard'],
    ['KEYBOARD', 'LEOPARD'],
    ['keyboard', 'leopard'],
    ['Keyboards', 'Leopards'],
    ['KEYBOARDS', 'LEOPARDS'],
    ['keyboards', 'leopards'],
    ['Witnesses', 'These dudes I know'],
    ['WITNESSES', 'THESE DUDES I KNOW'],
    ['witnesses', 'these dudes I know'],
    ['Witness', 'This dude I know'],
    ['WITNESS', 'THIS DUDE I KNOW'],
    ['witness', 'this dude I know'],
    ['Allegedly', 'Kinda Probably'],
    ['ALLEGEDLY', 'KINDAPROBABLY'],
    ['allegedly', 'kinda probably'],
{'fraction_non_alphanumeric': 0.16950329975686002, 'fraction_numerical': 0.019451198332754428, 'mean_word_length': 3.1799709724238028, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '4312499', 'n_tokens_mistral': 999, 'n_tokens_neox': 936, 'n_words': 248}