| 1 |
/* eslint-disable no-var */ |
| 2 |
/* global wp, calypsoifyGutenberg */ |
| 3 |
|
| 4 |
jQuery( function( $ ) { |
| 5 |
if ( |
| 6 |
wp && |
| 7 |
wp.data && |
| 8 |
wp.data.select && |
| 9 |
! wp.data.select( 'core/edit-post' ).isFeatureActive( 'fullscreenMode' ) |
| 10 |
) { |
| 11 |
wp.data.dispatch( 'core/edit-post' ).toggleFeature( 'fullscreenMode' ); |
| 12 |
} |
| 13 |
|
| 14 |
var editPostHeaderInception = setInterval( function() { |
| 15 |
var $closeButton = $( '.edit-post-fullscreen-mode-close__toolbar a' ); |
| 16 |
if ( $closeButton.length < 1 ) { |
| 17 |
return; |
| 18 |
} |
| 19 |
clearInterval( editPostHeaderInception ); |
| 20 |
|
| 21 |
$closeButton.attr( 'href', calypsoifyGutenberg.closeUrl ); |
| 22 |
} ); |
| 23 |
|
| 24 |
$( 'body.revision-php a' ).each( function() { |
| 25 |
var href = $( this ).attr( 'href' ); |
| 26 |
$( this ).attr( 'href', href.replace( '&classic-editor', '' ) ); |
| 27 |
} ); |
| 28 |
} ); |
| 29 |
|