var app=angular.module("myApp",[]);app.controller("myController",function(t,e){var a,o="#F0F0F0";e.data=[{item:"this is an example of text pasted onto this webpage. Click me to copy text to clipboard.",color:o}],$("body").bind("paste",function(t){$(".paste-example, .msg").hide(),a=o,"none"==!$(".paste-example").css("display")&&$(".paste-example").hide();var p=t.originalEvent.clipboardData?t.originalEvent.clipboardData.getData("text/plain"):window.clipboardData.getData("text"),i=/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(p);a=1==i?p:o,e.data.push({item:p,color:a}),e.$apply()}),t.copyItem=function(t){$(".msg").hide();var e=$(t.currentTarget).attr("id"),a=$("#"+e+" .paste-box-item").text();$("#textarea1").text(a),$("#"+e+" .msg").fadeIn(600);var o=document.querySelector("#textarea1");o.select();try{document.execCommand("copy")}catch(p){}}});
