copy shortcut
This commit is contained in:
@@ -92,6 +92,14 @@ function shareButton() {
|
||||
});
|
||||
}
|
||||
|
||||
document.addEventListener("keydown", function(event){
|
||||
if (event.ctrlKey || event.altKey) {
|
||||
return // prevent custom shortcuts from interfering with system shortcuts
|
||||
}
|
||||
if (event.which == 67 && !uploader.uploading()) { // C to copy to clipboard
|
||||
copyLink();
|
||||
}
|
||||
});
|
||||
function copyLink() {
|
||||
if(copyText(shareLink)) {
|
||||
console.log('Text copied');
|
||||
|
@@ -103,7 +103,7 @@
|
||||
<div id="details_popup" class="popup details_popup">
|
||||
<div id="details_popup_title" class="highlight_1">
|
||||
File Info
|
||||
<button style="position: absolute; top: 3px; right: 3px;" class="button_red" onclick="DetailsWindow.toggle();">🞫</button>
|
||||
<button style="position: absolute; top: 3px; right: 3px;" class="button_red" onclick="DetailsWindow.toggle();">{{template `close.svg`}}</button>
|
||||
</div>
|
||||
<div class="content_area">
|
||||
<span id="info_file_details"></span>
|
||||
|
@@ -81,7 +81,7 @@
|
||||
</button>
|
||||
</div>
|
||||
<button id="btn_copy_link" class="social_button" style="display: inline-block" onclick="copyLink()">
|
||||
{{template `copy.svg` .}}<br/><span>Copy link</span>
|
||||
{{template `copy.svg` .}}<br/><span><u>C</u>opy link</span>
|
||||
</button>
|
||||
<button id="btn_open_link" class="social_button" style="display: inline-block" onclick="openLink()">
|
||||
{{template `open_in_new.svg` .}}<br/><span>Open link</span>
|
||||
|
Reference in New Issue
Block a user