<commit_before><div class="instagram-gallery">
    <p class="title"><?php echo $this->getTitle() ?></p>
    <?php if ($this->getDescription()): ?>
        <p class="description"><?php echo nl2br($this->getDescription()) ?></p>
    <?php endif; ?>
    <div id="instagram-<?php echo $this->getHashtag() ?>" class="images" data-url="<?php echo Mage::getStoreConfig('instagram/api/url') . 'tags/' . $this->getHashtag() . '/media/recent?client_id=' . Mage::getStoreConfig('instagram/api/client_id') . '&count=' . $this->getLimit() ?>"></div>
</div>
<script>
    // Instagram Gallery
    var gallery = document.getElementById('instagram-<?php echo $this->getHashtag() ?>');

    function instagramImages(response){
        for(i=0; i<response.data.length; i++){
            insertImage(response.data[i]);
        }
    }

    function insertImage(data){
        var link = document.createElement('a');
        link.setAttribute('href', data.link);
        link.setAttribute('title', data.caption.text);

        var image = document.createElement('img');
        image.onload = function(){
            link.setAttribute('class', 'loaded');
        };
        image.setAttribute('src', data.images.low_resolution.url);

        link.appendChild(image);
        gallery.appendChild(link);
    }

    var script = document.createElement('script');
    script.src = gallery.getAttribute('data-url') + '&callback=instagramImages';
    document.body.appendChild(script);
</script><commit_msg>gallery html<commit_after><div class="instagram-gallery">
    <p class="title"><?php echo $this->getTitle() ?></p>
    <?php if ($this->getDescription()): ?>
        <p class="description"><?php echo nl2br($this->getDescription()) ?></p>
    <?php endif; ?>
    <div id="instagram-<?php echo $this->getHashtag() ?>" class="images" data-url="<?php echo Mage::getStoreConfig('instagram/api/url') . 'tags/' . $this->getHashtag() . '/media/recent?client_id=' . Mage::getStoreConfig('instagram/api/client_id') . '&count=' . $this->getLimit() ?>"></div>
</div>
<script>
    // Instagram Gallery
    var gallery = document.getElementById('instagram-<?php echo $this->getHashtag() ?>');

    function instagramImages(response){
        for(i=0; i<response.data.length; i++){
            insertImage(response.data[i]);
        }
    }

    function insertImage(data){
        var div = document.createElement('div');
        var link = document.createElement('a');
        link.setAttribute('href', data.link);
        link.setAttribute('title', data.caption.text);

        var image = document.createElement('img');
        image.onload = function(){
            div.setAttribute('class', 'loaded');
        };
        image.setAttribute('src', data.images.low_resolution.url);

        div.appendChild(link);
        link.appendChild(image);
        gallery.appendChild(div);
    }

    var script = document.createElement('script');
    script.src = gallery.getAttribute('data-url') + '&callback=instagramImages';
    document.body.appendChild(script);
</script>
{'fraction_non_alphanumeric': 0.18801448798156076, 'fraction_numerical': 0.0013170892327955218, 'mean_word_length': 3.4480234260614933, 'pattern_counts': {'":': 0, '<': 39, '<?xml version=': 0, '>': 51, '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': '6817426', 'n_tokens_mistral': 889, 'n_tokens_neox': 887, 'n_words': 154}