<commit_before>import g from './globals';
import Matreshka from 'matreshka/matreshka';
import $ from 'balajs';
import githubEmbed from 'github-embed';

export default class Examples extends Matreshka {
    constructor() {
        super()
            .bindNode('sandbox', 'article[id="!examples"]')
            .on('click::(.example-link)', evt => {
                const { target } = evt;
                const { href } = target;

                evt.preventDefault();

                if(!target.classList.contains('initialized')) {
                    const exampleMountBlock = target.parentNode.appendChild(document.createElement('div'))
                    exampleMountBlock.style.width = "100%";
                    exampleMountBlock.style.height = "500px";
                    console.log(`${href}.gh-embed.json`)
                    githubEmbed(exampleMountBlock, `${href}.gh-embed.json`)

                    target.classList.add('initialized');
                } else {
                    target.parentNode.lastChild.classList.toggle('hide');
                }
            })
    }
}<commit_msg>minor<commit_after>import g from './globals';
import Matreshka from 'matreshka/matreshka';
import $ from 'balajs';
import githubEmbed from 'github-embed';

export default class Examples extends Matreshka {
    constructor() {
        super()
            .bindNode('sandbox', 'article[id="!examples"]')
            .on('click::(.example-link)', evt => {
                const { target } = evt;
                const { href } = target;

                evt.preventDefault();

                if(!target.classList.contains('initialized')) {
                    const exampleMountBlock = target.parentNode.appendChild(document.createElement('div'));
                    exampleMountBlock.style.width = "100%";
                    exampleMountBlock.style.height = "500px";
                    githubEmbed(exampleMountBlock, `${href}.gh-embed.json`)

                    target.classList.add('initialized');
                } else {
                    target.parentNode.lastChild.classList.toggle('hide');
                }
            })
    }
}
{'fraction_non_alphanumeric': 0.12954333643988816, 'fraction_numerical': 0.005591798695246971, 'mean_word_length': 1.8324538258575198, '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': '5290804', 'n_tokens_mistral': 560, 'n_tokens_neox': 528, 'n_words': 95}