From 35a72bd219624257632d7bfafb586ba9b32d067f Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Mon, 19 Jun 2017 12:32:55 +0000 Subject: [PATCH] always close the pop-up when tab is re-loaded/opened otherwise JS has no access to the tab, since pop-up's context is no longer related to user action --- icedeb.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/icedeb.js b/icedeb.js index c36044c..30f4c3e 100644 --- a/icedeb.js +++ b/icedeb.js @@ -116,15 +116,12 @@ function link_clicked(e) { return false; } - if ( !e.target.classList.contains('icedeb-button') ) - return; - - let autoclose = true; - let clip_input = document.getElementById("clipboard"); + if(clip_input.value == '') + get_clipboard_contents(); let clip = trim(clip_input.value); - console.log(clip); + if(clip_input.value == '') return; let url; -- 2.39.2