diff options
Diffstat (limited to 'plugins/jetpack/modules/shortcodes/js')
4 files changed, 8 insertions, 6 deletions
diff --git a/plugins/jetpack/modules/shortcodes/js/gist.js b/plugins/jetpack/modules/shortcodes/js/gist.js index a97d7f91..d2d704dc 100644 --- a/plugins/jetpack/modules/shortcodes/js/gist.js +++ b/plugins/jetpack/modules/shortcodes/js/gist.js @@ -2,13 +2,18 @@ var gistStylesheetLoaded = false, gistEmbed = function() { $( '.gist-oembed' ).each( function( i, el ) { - var url = 'https://gist.github.com/' + $( el ).data( 'gist' ); + var url = 'https://gist.github.com/' + $( el ).data( 'gist' ), + ts = Number.parseInt( $( el ).data( 'ts' ), 10 ); $.ajax( { url: url, dataType: 'jsonp', } ).done( function( response ) { - $( el ).replaceWith( response.div ); + if ( ts && 8 !== ts ) { + $( el ).replaceWith( $( response.div ).css( 'tab-size', ts.toString() ) ); + } else { + $( el ).replaceWith( response.div ); + } if ( ! gistStylesheetLoaded ) { var stylesheet = diff --git a/plugins/jetpack/modules/shortcodes/js/jmpress.js b/plugins/jetpack/modules/shortcodes/js/jmpress.js index c6519cd9..907499bf 100644 --- a/plugins/jetpack/modules/shortcodes/js/jmpress.js +++ b/plugins/jetpack/modules/shortcodes/js/jmpress.js @@ -1307,7 +1307,7 @@ if ( item.length === 0 || item.closest( jmpress ).length === 0 ) { item = $( jmpress ) .find( stepSelector ) - [ prev ? 'last' : 'first' ](); + [ prev ? 'last' : 'first' ](); // eslint-disable-line no-unexpected-multiline } if ( ! item.length ) { return false; diff --git a/plugins/jetpack/modules/shortcodes/js/recipes-printthis.js b/plugins/jetpack/modules/shortcodes/js/recipes-printthis.js index e31fb24c..f2a1937c 100644 --- a/plugins/jetpack/modules/shortcodes/js/recipes-printthis.js +++ b/plugins/jetpack/modules/shortcodes/js/recipes-printthis.js @@ -1,4 +1,3 @@ -// jshint ignore: start /* * printThis v1.9.0 * @desc Printing plug-in for jQuery @@ -36,7 +35,6 @@ * Notes: * - the loadCSS will load additional css (with or without @media print) into the iframe, adjusting layout * - * jshint onevar: false, smarttabs: true, devel: true */ ( function( $ ) { var opt; diff --git a/plugins/jetpack/modules/shortcodes/js/slideshow-shortcode.js b/plugins/jetpack/modules/shortcodes/js/slideshow-shortcode.js index 44a2bd6f..e266465a 100644 --- a/plugins/jetpack/modules/shortcodes/js/slideshow-shortcode.js +++ b/plugins/jetpack/modules/shortcodes/js/slideshow-shortcode.js @@ -1,4 +1,3 @@ -/* jshint onevar:false, loopfunc:true */ /* global jetpackSlideshowSettings, escape */ function JetpackSlideshow( element, transition, autostart ) { |