Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add "Copy URL" context menu option when hovering over a URL #219
Your code depended on "Copy" being translated in order to correctly insert the new item. On the other hand, most of the default items (Cut, Paste, Delete) won't work in anyways, as the textview is not editable. I rewrote the code to remove the default items and insert only the ones fitting ones.
I also thought that searching through the list of menu items and looking for an item named "Copy" (with its translation) is a bit ugly, however, I didn't find another solution to insert the "Copy URL" item directly after the "Copy" item. However, if there is no translated "Copy" item, the code would have put the "Copy URL" item at the end of the list, so that wouldn't have caused too many problems. Removing the unused default items instead is a better idea though.
Thanks for merging!