Skip to content

Instantly share code, notes, and snippets.

Created September 4, 2015 05:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/55aa6b3c497db05fd4f7 to your computer and use it in GitHub Desktop.
Save anonymous/55aa6b3c497db05fd4f7 to your computer and use it in GitHub Desktop.
<button data-ember-action="1930" class="btn btn-blue 121313">Copy</button>
<input value="WOAH" type="text" class="form-control 121313">
var shortUrl = function(key) {
var button, input;
button = $("." + (key.get('key')))[0];
input = $("input." + (key.get('key')))[0];
return button.addEventListener('click', function() {
input.select();
return document.execCommand('copy');
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment