# Two new buttons: 'permalink' and 'cite'

+ 4 like - 0 dislike
120 views

Based on an idea of @dimension10 I have added two buttons below all posts:

• permalink: Copies the shortest possible URL of the post to your clipboard.
• cite: Copies the bibliographic data in BibTeX, as defined here, of the post to your clipboard.

Copying to the clipboard from a webpage is technically very difficult and will not work on all browsers due to security settings. Although there exists a variant using a small Flash-file to run and get the selection to the clipboard, I decided not to use it, as Flash should die now. The implemented version is based on Javascript and should work on Chrome 42+, Firefox 41+, Opera 29+, Internet Explorer 9+, but definitively not on Safari (which seems to block copying completely).

I am not able to test it on all existing browsers and would be thankful if you would report your experience (positive or negative) as comment below this announcement. Please note there also your browsers name and version.

Very nice, thanks Polarkernel!

Both new buttons work nicely with Firefox 43.0.4 and Internet Explorer 11.0,9600.18163 :-)

The Internet Explorer (which I use less often) asked if I really want to grant access to the clipboard the first time though.

permalink works on Chromium Version 47.0.2526.73 Ubuntu 14.04 (64-bit).

permalink also works on Firefox 43.0 for Ubuntu canonical -1.0.

permalink doesn't work on Konqueror Version 4.13.3 using KDE Development Platform 4.13.3. (It said copied to clipboard, but it didn't do it).

I just wanted to mention that I added a little script yesterday in the admin area to send an alert saying "Content copied to clipboard", as it seemed somewhat unclear to me at first when the button did nothing (the hover text was not enough).

I made the button blink to confirm the action, did this not work? I will replace your script by another within my code that shows also the copied content. There should also be an alert if copying was not possible, but it seems that there exist browsers that confirm a successful copy even if they didn't do it.For these it may be helpful to have the content in the confirmation alert. Maybe it will be possible to select and copy the text from there.

@polarkernel The blink felt like an error message to me. I agree that having the clipboard content in the alert is useful, perhaps saying "Following content ccopied to clipboard".

 Please use answers only to (at least partly) answer questions. To comment, discuss, or ask for clarification, leave a comment instead. To mask links under text, please type your text, highlight it, and click the "link" button. You can then enter your link URL. Please consult the FAQ for as to how to format your post. This is the answer box; if you want to write a comment instead, please use the 'add comment' button. Live preview (may slow down editor)   Preview Your name to display (optional): Email me at this address if my answer is selected or commented on: Privacy: Your email address will only be used for sending these notifications. Anti-spam verification: If you are a human please identify the position of the character covered by the symbol $\varnothing$ in the following word:p$\hbar$ysicsOver$\varnothing$lowThen drag the red bullet below over the corresponding character of our banner. When you drop it there, the bullet changes to green (on slow internet connections after a few seconds). To avoid this verification in future, please log in or register.