blob: b0d0d609e7fc3a0bcb2de00be90df87a80fb3676 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
/* global window */
( function() {
var instagramEmbed = function() {
if (
'undefined' !== typeof window.instgrm &&
window.instgrm.Embeds &&
'function' === typeof window.instgrm.Embeds.process
) {
window.instgrm.Embeds.process();
} else {
var s = document.createElement( 'script' );
s.async = true;
s.defer = true;
s.src = '//platform.instagram.com/en_US/embeds.js';
document.getElementsByTagName( 'body' )[ 0 ].appendChild( s );
}
};
if ( 'undefined' !== typeof jQuery && 'undefined' !== typeof infiniteScroll ) {
jQuery( document.body ).on( 'post-load', instagramEmbed );
}
instagramEmbed();
} )();
|