Skip to content

Instantly share code, notes, and snippets.

@dvdsmpsn
Last active December 18, 2015 04:49
Show Gist options
  • Save dvdsmpsn/5728446 to your computer and use it in GitHub Desktop.
Save dvdsmpsn/5728446 to your computer and use it in GitHub Desktop.
Move the Confluence "Create" button back to the pre-Confluence 5 location.
<!-- Add this markup to Confluence Admin | Look and Feel | Custom HTML | At the END of the BODY - @see: https://gist.github.com/dvdsmpsn/5728446 -->
<style>
header#header #create-page-button {
display: none; /* hide the create button in the header */
}
</style>
<script>
// Move the Confluence "Create" button back to the pre-Confluence 5 location.
AJS.toInit(function($){
$('#navigation > ul.ajs-menu-bar').prepend(
$('#create-page-button')
.addClass('add') // add the "+" icon
.removeClass('aui-button aui-style aui-button-primary aui-nav-imagelink') // remove the button style
.parent().addClass('ajs-button normal') // like the rest of the navigation items
);
$('#create-page-button').find('span').eq(0).attr('style','padding:0;'); // fix the left padding before the "+" icon
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment