Really fix ZeroClipboard

This commit is contained in:
Joseph Schorr 2014-08-25 15:59:50 -04:00
parent 4b2a0b5063
commit 837630359c

View file

@ -3,7 +3,7 @@ var ROBOT_PATTERN = '^[a-zA-Z][a-zA-Z0-9]{3,29}$';
$.fn.clipboardCopy = function() { $.fn.clipboardCopy = function() {
if (zeroClipboardSupported) { if (zeroClipboardSupported) {
(new ZeroClipboard($(this), { 'swfPath': 'static/lib/ZeroClipboard.swf' })); (new ZeroClipboard($(this)));
return true; return true;
} }
@ -12,6 +12,10 @@ $.fn.clipboardCopy = function() {
}; };
var zeroClipboardSupported = true; var zeroClipboardSupported = true;
ZeroClipboard.config({
'swfPath': 'static/lib/ZeroClipboard.swf'
});
ZeroClipboard.on("error", function(e) { ZeroClipboard.on("error", function(e) {
zeroClipboardSupported = false; zeroClipboardSupported = false;
}); });