Created
August 28, 2015 14:08
-
-
Save beshanoe/dcab9f6e1561747feb3b to your computer and use it in GitHub Desktop.
Revisions
-
beshanoe created this gist
Aug 28, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,24 @@ function cop(text) { if (document.execCommand) { var textArea = $('<textarea></textarea>'); textArea.css({ position: 'absolute', top: 0, left: -10000 }); textArea.val(text); $(document.body).append(textArea); textArea.select(); document.execCommand('copy'); textArea.remove(); } } setInterval(function() { if (!$('#copybaba').length) { if ($('.ui-title').length) { $('.ui-title').prepend($('<button id="copybaba">Copy!</button>').click(function(){ cop($('.ui-title td').map(function(){return this.textContent}).toArray().join(' ')); })) } } }, 500);