Added more functions to CTRL+V
This commit is contained in:
parent
1e69e48486
commit
000b3f850b
File diff suppressed because one or more lines are too long
@ -55,13 +55,18 @@ document.addEventListener('keyup', keyEvent => {
|
|||||||
|
|
||||||
document.addEventListener('paste', pasteEvent => {
|
document.addEventListener('paste', pasteEvent => {
|
||||||
pasteText = pasteEvent.clipboardData.getData('Text')
|
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') {
|
if (main_selected === 'analyzer_tab') {
|
||||||
EventBus.$emit('linkAnalyzerTab:reset')
|
EventBus.$emit('linkAnalyzerTab:reset')
|
||||||
socket.emit('analyzeLink', pasteText)
|
socket.emit('analyzeLink', pasteText)
|
||||||
} else {
|
} else {
|
||||||
Downloads.sendAddToQueue(pasteText)
|
Downloads.sendAddToQueue(pasteText)
|
||||||
}
|
}
|
||||||
|
}else{
|
||||||
|
let searchbar = document.querySelector('#searchbar')
|
||||||
|
searchbar.focus()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user