I would like to make a browser "user script" (like Greasemonkey etc) that can pop open a window with a text field for the user to select and copy so they can paste it elsewhere.
I want to match the site and there's already the "share a link to this answer" dialog:
Is there any way to call this code from a user script? Is the code available somewhere where I can make my own version of it?
Is there generally a "best" way a user script to mimic a piece of Stack Exchange GUI like this?