<commit_before><!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>Instagram Demo | SocialDig.js</title>
        <link href="../css/style.css" rel="stylesheet">
    </head>

    <body>
        <section class="section section--demo">
            <div class="container">
                <h4>Instagram</h4>
                <div class="instagram"></div>
            </div>
        </section>

        <!-- JavaScript -->
        <script src="../dist/SocialDig.js"></script>
        <script>
            SocialDig({
                service: 'instagram',
                user: 'kjbrum',
                auth: '<PASSWORD>'
            }, function(data) {
                if (data.data.length > 0) {
                    var list = document.createElement('div');
                    list.className = 'g g-s-2 photos';

                    // Loop through the photos
                    data.data.forEach(function(el, idx, arr) {
                        if (idx < 4) {
                            var item = document.createElement('div');
                            item.className = 'gi photo';

                            var caption = '';
                            if (el.caption) {
                                caption = '<br>' + el.caption.text;
                            }

                            item.innerHTML = '<a href="' + el.link + '" target="_blank"><img src="' + el.images.standard_resolution.url + '">' + caption + '</a>';

                            // Add the new item to the list
                            list.appendChild(item);
                        }
                    });

                    // Add the list to the page
                    document.querySelector('.instagram').appendChild(list);
                }<commit_msg>Make the instagram demo use embedding<commit_after><!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>Instagram Demo | SocialDig.js</title>
        <link href="../css/style.css" rel="stylesheet">
    </head>

    <body>
        <section class="section section--demo">
            <div class="container">
                <h4>Instagram</h4>
                <div class="instagram"></div>
            </div>
        </section>

        <!-- JavaScript -->
        <script src="../dist/SocialDig.js"></script>
        <script>
            SocialDig({
                service: 'instagram',
                user: 'kjbrum',
                auth: '<PASSWORD>'
            }, function(data) {
                if (data.data.length > 0) {
                    var list = document.createElement('div');
                    list.className = 'g g-s-2 photos';

                    // Loop through the photos
                    data.data.forEach(function(el, idx, arr) {
                        if (idx < 4) {
                            console.log(el);
                            var item = document.createElement('div');
                            item.className = 'gi photo';

                            var caption = '';
                            if (el.caption) {
                                caption = '<br>' + el.caption.text;
                            }

                            item.innerHTML = '<blockquote class="instagram-media" data-instgrm-captioned data-instgrm-version="7" style=" background:#FFF; border:0; border-radius:3px; box-shadow:0 0 1px 0 rgba(0,0,0,0.5),0 1px 10px 0 rgba(0,0,0,0.15); margin: 1px; max-width:658px; padding:0; width:99.375%; width:-webkit-calc(100% - 2px); width:calc(100% - 2px);"><div style="padding:8px;"> <div style=" background:#F8F8F8; line-height:0; margin-top:40px; padding:50% 0; text-align:center; width:100%;"> <div style=" background:url(' + el.images.standard_resolution.url + '); display:block; height:44px; margin:0 auto -44px; position:relative; top:-22px; width:44px;"></div></div> <p style=" margin:8px 0 0 0; padding:0 4px;"> <a href="' + el.link + '" style=" color:#000; font-family:Arial,sans-serif; font-size:14px; font-style:normal; font-weight:normal; line-height:17px; text-decoration:none; word-wrap:break-word;" target="_blank">' + caption + '</a></p> <p style=" color:#c9c8cd; font-family:Arial,sans-serif; font-size:14px; line-height:17px; margin-bottom:0; margin-top:8px; overflow:hidden; padding:8px 0 7px; text-align:center; text-overflow:ellipsis; white-space:nowrap;">A photo posted by ' + el.user.full_name + ' (@' + el.user.username + ') on <time style=" font-family:Arial,sans-serif; font-size:14px; line-height:17px;" datetime="2012-05-28T22:32:08+00:00">May 28, 2012 at 3:32pm PDT</time></p></div></blockquote>';

                            // Add the new item to the list
                            list.appendChild(item);
                        }
                    });

                    // Add the list to the page
                    document.querySelector('.instagram').appendChild(list);

                    // Add the new script
                    var instaScript = document.createElement('script');
                    instaScript.src = '//platform.instagram.com/en_US/embeds.js';
                    instaScript.async = true;
                    instaScript.defer = true;
                    document.getElementsByTagName('body')[0].appendChild(instaScript);
                }
{'fraction_non_alphanumeric': 0.14802219437981026, 'fraction_numerical': 0.02380526221585824, 'mean_word_length': 1.6051282051282052, 'pattern_counts': {'":': 0, '<': 74, '<?xml version=': 0, '>': 74, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7445699', 'n_tokens_mistral': 1665, 'n_tokens_neox': 1504, 'n_words': 317}