Permalink
Browse files

Add copied callback

After text is copied, clippy will attempt to callback clippyCopiedCallback (javascript function) passing in the clippy id.
  • Loading branch information...
1 parent 835d87c commit 675226450ca22f7a2cf558f0d1e8f2bac13bc4fb @kneath kneath committed Dec 23, 2009
Showing with 1 addition and 0 deletions.
  1. +1 −0 Clippy.hx
View
@@ -43,6 +43,7 @@ class Clippy {
button.addEventListener(MouseEvent.MOUSE_UP, function(e:MouseEvent) {
flash.system.System.setClipboard(ExternalInterface.call("(function(id){if(document.getElementById(id)){ return(document.getElementById(id).innerHTML) }else{alert('WARN: ' + id + ' Not found ');}})",id));
+ ExternalInterface.call("(function(id){if(clippyCopiedCallback){ clippyCopiedCallback(id)}})", id);
label.text = copied;
label.setTextFormat(format);
});

0 comments on commit 6752264

Please sign in to comment.