diff options
author | Anthony G. Basile <blueness@gentoo.org> | 2019-01-01 22:18:11 -0500 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2019-01-01 22:18:11 -0500 |
commit | 018bd442ec1e04ba78a6628763414eb60b359398 (patch) | |
tree | 448cde462397af33e5a964ba5d0803b73c65040e /plugins/jetpack/modules/calypsoify/mods-gutenberg.js | |
parent | Update easy-table 1.8 (diff) | |
download | blogs-gentoo-018bd442ec1e04ba78a6628763414eb60b359398.tar.gz blogs-gentoo-018bd442ec1e04ba78a6628763414eb60b359398.tar.bz2 blogs-gentoo-018bd442ec1e04ba78a6628763414eb60b359398.zip |
Update jetpack 6.8.1
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'plugins/jetpack/modules/calypsoify/mods-gutenberg.js')
-rw-r--r-- | plugins/jetpack/modules/calypsoify/mods-gutenberg.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/plugins/jetpack/modules/calypsoify/mods-gutenberg.js b/plugins/jetpack/modules/calypsoify/mods-gutenberg.js new file mode 100644 index 00000000..abcc3ed5 --- /dev/null +++ b/plugins/jetpack/modules/calypsoify/mods-gutenberg.js @@ -0,0 +1,23 @@ +/* eslint-disable no-var */ +/* global wp, calypsoifyGutenberg */ + +jQuery( function( $ ) { + if ( wp && wp.data && wp.data.select && ! wp.data.select( 'core/edit-post' ).isFeatureActive( 'fullscreenMode' ) ) { + wp.data.dispatch( 'core/edit-post' ).toggleFeature( 'fullscreenMode' ); + } + + var editPostHeaderInception = setInterval( function() { + var $closeButton = $( '.edit-post-fullscreen-mode-close__toolbar a' ); + if ( $closeButton.length < 1 ) { + return; + } + clearInterval( editPostHeaderInception ); + + $closeButton.attr( 'href', calypsoifyGutenberg.closeUrl ); + } ); + + $( 'body.revision-php a' ).each( function() { + var href = $( this ).attr( 'href' ); + $( this ).attr( 'href', href.replace( '&classic-editor', '' ) ); + } ); +} ); |