Replace ZeroClipboard with clipboard.js

For copy/paste support in our code samples, we are using the
ZeroClipboard library which relies heavily on Flash.
Because many browsers/extensions are disabling this plugin nowadays,
this commit replaces ZeroClipboard with a native, lightweight solution
for this feature.
This commit is contained in:
Brian Clozel
2016-04-26 10:17:19 +02:00
parent 25706255a3
commit c7ae9c6eeb
6 changed files with 38 additions and 24 deletions

View File

@@ -107,9 +107,7 @@ Spring.SnippetView = Backbone.View.extend({
var html = $(this.combinedTemplate(this.model));
this.$el.html(html);
if (ZeroClipboard.detectFlashSupport()) {
Spring.buildCopyButton(html.find(":first"), "snippet");
}
Spring.buildCopyButton(html.find(":first"), "snippet");
return this;
},