| @@ -39,10 +39,10 @@ | ||
| 39 | 39 | var handler_item_leave = function () { |
| 40 | 40 | $( original ).data( 'hasitem', false ); |
| 41 | 41 | |
| 42 | 42 | if ( $( original ).data( 'hasoriginal' ) === false ) { |
| 43 | - var timer = setTimeout( close_it, 800 ); | |
| 44 | - $( original ).data( 'timer2', timer ); | |
| 43 | + var timer2 = setTimeout( close_it, 800 ); | |
| 44 | + $( original ).data( 'timer2', timer2 ); | |
| 45 | 45 | } |
| 46 | 46 | }; |
| 47 | 47 | |
| 48 | 48 | var handler_item_enter = function () { |
| @@ -53,10 +53,10 @@ | ||
| 53 | 53 | var handler_original_leave = function () { |
| 54 | 54 | $( original ).data( 'hasoriginal', false ); |
| 55 | 55 | |
| 56 | 56 | if ( $( original ).data( 'hasitem' ) === false ) { |
| 57 | - var timer = setTimeout( close_it, 800 ); | |
| 58 | - $( original ).data( 'timer2', timer ); | |
| 57 | + var timer2 = setTimeout( close_it, 800 ); | |
| 58 | + $( original ).data( 'timer2', timer2 ); | |
| 59 | 59 | } |
| 60 | 60 | }; |
| 61 | 61 | |
| 62 | 62 | var handler_original_enter = function () { |
| @@ -136,9 +136,9 @@ | ||
| 136 | 136 | |
| 137 | 137 | $( '.sharing-hidden ul li' ).remove(); |
| 138 | 138 | |
| 139 | 139 | // Add hidden items into the inner panel |
| 140 | - $( 'ul.services-hidden li' ).each( function (/*pos, item*/) { | |
| 140 | + $( 'ul.services-hidden li' ).each( function ( /*pos, item*/ ) { | |
| 141 | 141 | if ( $( this ).hasClass( 'service' ) ) { |
| 142 | 142 | var service = $( this ).attr( 'id' ); |
| 143 | 143 | $( '.sharing-hidden .inner ul' ).append( |
| 144 | 144 | $( '#live-preview ul.archive .preview-' + service ).clone() |
| @@ -160,19 +160,20 @@ | ||
| 160 | 160 | .addClass( 'no-text' ); |
| 161 | 161 | $( '#live-preview div.sharedaddy' ).addClass( 'sd-social-icon' ); |
| 162 | 162 | } else if ( 'official' === button_style ) { |
| 163 | 163 | $( '#live-preview ul.preview .advanced, .sharing-hidden .inner ul .advanced' ).each( |
| 164 | - function (/*i*/) { | |
| 164 | + function ( /*i*/ ) { | |
| 165 | 165 | if ( |
| 166 | 166 | ! $( this ).hasClass( 'preview-press-this' ) && |
| 167 | 167 | ! $( this ).hasClass( 'preview-email' ) && |
| 168 | 168 | ! $( this ).hasClass( 'preview-mastodon' ) && |
| 169 | 169 | ! $( this ).hasClass( 'preview-nextdoor' ) && |
| 170 | + ! $( this ).hasClass( 'preview-bluesky' ) && | |
| 170 | 171 | ! $( this ).hasClass( 'preview-print' ) && |
| 171 | 172 | ! $( this ).hasClass( 'preview-reddit' ) && |
| 172 | 173 | ! $( this ).hasClass( 'preview-telegram' ) && |
| 174 | + ! $( this ).hasClass( 'preview-threads' ) && | |
| 173 | 175 | ! $( this ).hasClass( 'preview-jetpack-whatsapp' ) && |
| 174 | - ! $( this ).hasClass( 'preview-x' ) && | |
| 175 | 176 | ! $( this ).hasClass( 'share-custom' ) && |
| 176 | 177 | ! $( this ).hasClass( 'share-deprecated' ) |
| 177 | 178 | ) { |
| 178 | 179 | $( this ) |
| @@ -241,9 +242,9 @@ | ||
| 241 | 242 | jQuery( '.' + service + '-extra-options' ).fadeOut( 'slow' ); |
| 242 | 243 | } |
| 243 | 244 | |
| 244 | 245 | function save_services() { |
| 245 | - $( '#enabled-services h3 img' ).show(); | |
| 246 | + $( '#enabled-services h3 .spinner' ).addClass( 'is-active' ); | |
| 246 | 247 | |
| 247 | 248 | // Toggle various dividers/help texts |
| 248 | 249 | if ( $( '#enabled-services ul.services-enabled li.service' ).length > 0 ) { |
| 249 | 250 | $( '#drag-instructions' ).hide(); |
| @@ -290,14 +291,14 @@ | ||
| 290 | 291 | update_preview(); |
| 291 | 292 | |
| 292 | 293 | // Save it |
| 293 | 294 | $( '#save-enabled-shares' ).ajaxSubmit( function () { |
| 294 | - $( '#enabled-services h3 img' ).hide(); | |
| 295 | + $( '#enabled-services h3 .spinner' ).removeClass( 'is-active' ); | |
| 295 | 296 | } ); |
| 296 | 297 | } |
| 297 | 298 | |
| 298 | 299 | $( '#enabled-services .services ul' ).sortable( { |
| 299 | - receive: function (/*event, ui*/) { | |
| 300 | + receive: function ( /*event, ui*/ ) { | |
| 300 | 301 | save_services(); |
| 301 | 302 | }, |
| 302 | 303 | stop: function () { |
| 303 | 304 | save_services(); |
| @@ -302,9 +303,9 @@ | ||
| 302 | 303 | stop: function () { |
| 303 | 304 | save_services(); |
| 304 | 305 | $( 'li.service' ).enableSelection(); // Fixes a problem with Chrome |
| 305 | 306 | }, |
| 306 | - over: function (/*event, ui*/) { | |
| 307 | + over: function ( /*event, ui*/ ) { | |
| 307 | 308 | $( this ).find( 'ul' ).addClass( 'dropping' ); |
| 308 | 309 | |
| 309 | 310 | // Ensure the 'end-fix' is at the end |
| 310 | 311 | $( '#enabled-services li.end-fix' ).remove(); |
| @@ -309,9 +310,9 @@ | ||
| 309 | 310 | // Ensure the 'end-fix' is at the end |
| 310 | 311 | $( '#enabled-services li.end-fix' ).remove(); |
| 311 | 312 | $( '#enabled-services ul' ).append( '<li class="end-fix"></li>' ); |
| 312 | 313 | }, |
| 313 | - out: function (/*event, ui*/) { | |
| 314 | + out: function ( /*event, ui*/ ) { | |
| 314 | 315 | $( this ).find( 'ul' ).removeClass( 'dropping' ); |
| 315 | 316 | |
| 316 | 317 | // Ensure the 'end-fix' is at the end |
| 317 | 318 | $( '#enabled-services li.end-fix' ).remove(); |
| @@ -321,9 +322,9 @@ | ||
| 321 | 322 | ui.find( '.advanced-form' ).hide(); |
| 322 | 323 | |
| 323 | 324 | return ui.clone(); |
| 324 | 325 | }, |
| 325 | - start: function (/*event, ui*/) { | |
| 326 | + start: function ( /*event, ui*/ ) { | |
| 326 | 327 | // Make sure that the advanced section is closed |
| 327 | 328 | $( '.advanced-form' ).hide(); |
| 328 | 329 | $( 'li.service' ).disableSelection(); // Fixes a problem with Chrome |
| 329 | 330 | }, |
| @@ -458,18 +459,18 @@ | ||
| 458 | 459 | // Add service |
| 459 | 460 | $( '#new-service form' ).ajaxForm( { |
| 460 | 461 | beforeSubmit: function () { |
| 461 | 462 | $( '#new-service-form .error' ).hide(); |
| 462 | - $( '#new-service-form img' ).show(); | |
| 463 | - $( '#new-service-form input[type=submit]' ).prop( 'disabled', true ); | |
| 463 | + $( '#new-service-form .spinner' ).addClass( 'is-active' ); | |
| 464 | + $( '#new-service-form input[type="submit"]' ).prop( 'disabled', true ); | |
| 464 | 465 | }, |
| 465 | 466 | success: function ( response ) { |
| 466 | - $( '#new-service-form img' ).hide(); | |
| 467 | + $( '#new-service-form .spinner' ).removeClass( 'is-active' ); | |
| 467 | 468 | |
| 468 | 469 | if ( '' + response === '1' ) { |
| 469 | 470 | $( '#new-service-form .inerror' ).removeClass( 'inerror' ).addClass( 'error' ); |
| 470 | 471 | $( '#new-service-form .error' ).show(); |
| 471 | - $( '#new-service-form input[type=submit]' ).prop( 'disabled', false ); | |
| 472 | + $( '#new-service-form input[type="submit"]' ).prop( 'disabled', false ); | |
| 472 | 473 | } else { |
| 473 | 474 | document.location.reload(); |
| 474 | 475 | } |
| 475 | 476 | }, |
| @@ -486,9 +487,9 @@ | ||
| 486 | 487 | .parents( 'li:first' ) |
| 487 | 488 | .css( 'backgroundImage', 'url("' + sharing_loading_icon + '")' ); |
| 488 | 489 | |
| 489 | 490 | // Save |
| 490 | - form.ajaxSubmit( function (/*response*/) { | |
| 491 | + form.ajaxSubmit( function ( /*response*/ ) { | |
| 491 | 492 | // Remove the item |
| 492 | 493 | form.parents( 'li:first' ).fadeOut( function () { |
| 493 | 494 | $( this ).remove(); |
| 494 | 495 | |