Really fix ZeroClipboard
This commit is contained in:
parent
4b2a0b5063
commit
837630359c
1 changed files with 5 additions and 1 deletions
|
@ -3,7 +3,7 @@ var ROBOT_PATTERN = '^[a-zA-Z][a-zA-Z0-9]{3,29}$';
|
|||
|
||||
$.fn.clipboardCopy = function() {
|
||||
if (zeroClipboardSupported) {
|
||||
(new ZeroClipboard($(this), { 'swfPath': 'static/lib/ZeroClipboard.swf' }));
|
||||
(new ZeroClipboard($(this)));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -12,6 +12,10 @@ $.fn.clipboardCopy = function() {
|
|||
};
|
||||
|
||||
var zeroClipboardSupported = true;
|
||||
ZeroClipboard.config({
|
||||
'swfPath': 'static/lib/ZeroClipboard.swf'
|
||||
});
|
||||
|
||||
ZeroClipboard.on("error", function(e) {
|
||||
zeroClipboardSupported = false;
|
||||
});
|
||||
|
|
Reference in a new issue