zotero / scaffold

Zotero translator creation IDE
http://www.zotero.org/support/dev/scaffold
38 stars 9 forks source link

Copy test URL to clipboard #80

Closed zuphilip closed 6 years ago

zuphilip commented 6 years ago

I would like to have still another feature after #77: A possibility to copy the url of the a selected test to the clipboard, which I then can also open in my usual browser to use the browser tools etc.

However, I have no idea how to do a copy to clipboard functionality in XUL. Is this easily possible? For another project (not XUL) I used the library clipboard.js. Or are there native Javascript/XUL functions for that?

dstillman commented 6 years ago

Zotero.Utilities.Internal.copyTextToClipboard(str) will do it for you, and just having Ctrl/Cmd-C work while a URL is selected would be a pretty clean option, but if the goal is just to open it in a browser then we could use Zotero.launchURL(url). The buttons are getting out of hand, but that (and other actions) could go in a menu with a bound key.

zuphilip commented 6 years ago

Thank you very much for the information! Is it okay to first come up with a new button and try the redesign in another issue/PR? I could imagine a context menu for most of the buttons in the Testing tab.

dstillman commented 6 years ago

Sure.

(And a context menu would certainly make sense for this one.)

zuphilip commented 6 years ago

Implemented in #83