Add Custom Button to Copy Permalink/Shortcode in Atlassian Confluence to top of Every Page

Atlassian Confluence JavaScript

⁠|Add Custom Button to Copy Permalink/Shortcode in Atlassian Confluence to top of Every Page 

Whenever a page in Atlassian Confluence is moved or renamed, its canonical URL is updated.  This can quickly lead to broken links after a change has been made.  To solve this issue, Atlassian Confluence has paired each Confluence Page with a permalink (aka shortlink) which will always stay the same - even after a page has been renamed or moved.  For instance, the following canonical URL is (at the time of writing this) associated with this shortlink:

https://support.member.buzz/display/organizers/Custom+Domains

https://support.member.buzz/x/egEi 

However, getting to this link can be buried under several dropdowns, and, if you have a public facing Confluence Space like we have with Member.buzz Support, it can be difficult to have something visible to visitors.

⁠To solve this, we wrote a little JavaScript that is included in the HTML of our Confluence Pages:

Most of this script should work for most instances - the one part that you may want to change is the $("#page-metadata-banner .banner") selector - this works for our theme (provided by Refined), but you will want to find some element to add your new button to on your page.  Here is the result:

⁠Comment below if you have found any other creative solutions to this problem!

Comments

To add a comment, please login or register.

Related

C-Level Security: When your team uses military analogies, are they using the wrong narrative?
For years, I have bristled when people would use medieval military descriptions in an attempt to convey concepts within the Network Security business. Bastions, Firewalls, Moats, Drawbridges, Countermeasures; all of these descriptions give way to a more accurate and detailed explanation of what was really taking place.
Setup Point-to-Site VPN with Ubiquiti EdgeRouter
Learn how to setup a VPN with your Ubiquiti EdgeRouter.
Turning Atlassian JIRA into a CRM
Here at Member.buzz, we use Atlassian JIRA to track our features, bugs, and incoming requests from users through our Support Site. So when it came to choosing a CRM, we wanted to find one that integrated nicely with the rest of our infrastructure.Our first thought was to try out some of the existing JIRA CRM plugins. Here are the ones we tried out:CRM for JIRAAtlas CRMKanoah CRMAlthough there were definitely some interesting features among these options, there was nothing substantial enough to make us want to choose a specific one. We wanted something simple, yet well-integrated into what we already had
Using a Lenovo P51 Laptop with an Airplane Power Supply
The Lenovo P51 Laptop comes with a huge 170 watt Power Supply. However, airplane power supplies provide a maximum of somewhere between 75-100 watts. If you plugin a power supply requiring more watts, the circuit breaker will short out and the power will stop flowing.