diff --git a/popup.js b/popup.js index 023569f..7e7ad49 100644 --- a/popup.js +++ b/popup.js @@ -70,6 +70,7 @@ function setupWindowElement(currentWindow,callback){ var tabInfo = document.createElement("span"); var tabCount = document.createElement("span"); var tabWord = document.createElement("span"); + var clickCount = 0; li.classList.add("window"); li.classList.add("noselect"); ul.classList.add("tabs"); @@ -86,6 +87,33 @@ function setupWindowElement(currentWindow,callback){ tabCount.textContent = currentWindow.tabs.length.toString(); tabWord.classList.add("tabWord"); tabWord.textContent = (currentWindow.tabs.length>1 ? " tabs":" tab"); + textContent.addEventListener('click',function(event){ + if (event.clientX>windowName.getBoundingClientRect().left && event.clientXwindowName.getBoundingClientRect().left && event.clientX