summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/jetpack/modules/shortcodes/js/gist.js')
-rw-r--r--plugins/jetpack/modules/shortcodes/js/gist.js32
1 files changed, 0 insertions, 32 deletions
diff --git a/plugins/jetpack/modules/shortcodes/js/gist.js b/plugins/jetpack/modules/shortcodes/js/gist.js
deleted file mode 100644
index d2d704dc..00000000
--- a/plugins/jetpack/modules/shortcodes/js/gist.js
+++ /dev/null
@@ -1,32 +0,0 @@
-( function( $, undefined ) {
- var gistStylesheetLoaded = false,
- gistEmbed = function() {
- $( '.gist-oembed' ).each( function( i, el ) {
- var url = 'https://gist.github.com/' + $( el ).data( 'gist' ),
- ts = Number.parseInt( $( el ).data( 'ts' ), 10 );
-
- $.ajax( {
- url: url,
- dataType: 'jsonp',
- } ).done( function( response ) {
- if ( ts && 8 !== ts ) {
- $( el ).replaceWith( $( response.div ).css( 'tab-size', ts.toString() ) );
- } else {
- $( el ).replaceWith( response.div );
- }
-
- if ( ! gistStylesheetLoaded ) {
- var stylesheet =
- '<link rel="stylesheet" href="' + response.stylesheet + '" type="text/css" />';
-
- $( 'head' ).append( stylesheet );
-
- gistStylesheetLoaded = true;
- }
- } );
- } );
- };
-
- $( document ).ready( gistEmbed );
- $( 'body' ).on( 'post-load', gistEmbed );
-} )( jQuery );