Added more functions to CTRL+V

This commit is contained in:
RemixDev 2020-08-25 15:34:10 +02:00
parent 1e69e48486
commit 000b3f850b
2 changed files with 12 additions and 7 deletions

File diff suppressed because one or more lines are too long

View File

@ -55,13 +55,18 @@ document.addEventListener('keyup', keyEvent => {
document.addEventListener('paste', pasteEvent => {
pasteText = pasteEvent.clipboardData.getData('Text')
if (pasteEvent.target.localName != "input" && isValidURL(pasteText)){
if (pasteEvent.target.localName != "input"){
if (isValidURL(pasteText)){
if (main_selected === 'analyzer_tab') {
EventBus.$emit('linkAnalyzerTab:reset')
socket.emit('analyzeLink', pasteText)
} else {
Downloads.sendAddToQueue(pasteText)
}
}else{
let searchbar = document.querySelector('#searchbar')
searchbar.focus()
}
}
})