Add simple "Copy to Clipboard"

This will let people copy to clipboard by left-clicking the link
right-click->copy still works
This commit is contained in:
Arctic Code
2013-08-26 10:25:23 -05:00
parent d3d8302f94
commit a3806241bd
2 changed files with 8 additions and 4 deletions

View File

@@ -170,8 +170,8 @@
<script type="text/javascript">
jQuery(document).ready(function(){
// When the page loads, we're gonna want to hide the shorten-password and report-details elements
$("#shorten-password").slideUp("slow");
$("#report-details").slideUp("slow");
$("#shorten-password").slideUp("fast");
$("#report-details").slideUp("fast");
$('#link').focus();
$('#error').fadeIn("slow");
@@ -200,6 +200,10 @@
});
});
function copyToClipboard(text){
window.prompt ("Copy to clipboard: Ctrl+C, Enter (when closed I will open your link in a new tab)", text);
}
// This is our AJAX - Thank you Wizzy <3
$("#form-shorten").submit(function(event){
event.preventDefault();