Created
September 4, 2015 05:08
-
-
Save anonymous/55aa6b3c497db05fd4f7 to your computer and use it in GitHub Desktop.
This file contains 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 characters
<button data-ember-action="1930" class="btn btn-blue 121313">Copy</button> | |
<input value="WOAH" type="text" class="form-control 121313"> |
This file contains 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 characters
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