]> source.dussan.org Git - gitblit.git/commit
Replace SWF clippy with clipboardjs on repository page
authorFlorian Zschocke <f.zschocke+git@gmail.com>
Sun, 20 Nov 2022 17:53:26 +0000 (18:53 +0100)
committerFlorian Zschocke <f.zschocke+git@gmail.com>
Sun, 20 Nov 2022 17:53:26 +0000 (18:53 +0100)
commitc4fc5b38fa69036eee93758a536f65e3ac8ccb76
treea798ca6ef52f1b8166eff735f4b8b097ca36f1fb
parentc84179a751da1e4bb84e7d30ff848c0d197ec6a2
Replace SWF clippy with clipboardjs on repository page

Shockwave Flash is dead. But Gitblit still uses it to copy the repository
URLs to the clip board. Which doesn't work anymore since no browser uses
Flash anymore, so this has degraded disgracefully.

Instead, we can use JavaScript to copy directly to the clipboard, now
that there are APIs for it. So replace the use of clippy.swf on the
repository page with clipboard.js[1]. This right now only has the
functionality to copy to clipboard but now visual feedback, yet.

This addresses GH issue #1241.

[1] https://clipboardjs.com
src/main/java/com/gitblit/wicket/pages/SummaryPage.html
src/main/java/com/gitblit/wicket/panels/RepositoryUrlPanel.html
src/main/java/com/gitblit/wicket/panels/RepositoryUrlPanel.java
src/main/resources/clipboard/clipboard.min.js [new file with mode: 0644]