diff --git a/tabs-tabs-tabs/tabs.html b/tabs-tabs-tabs/tabs.html index df22073..7085c0c 100644 --- a/tabs-tabs-tabs/tabs.html +++ b/tabs-tabs-tabs/tabs.html @@ -30,7 +30,11 @@ Zoom in
Reset zoom
- Zoom out + Zoom out
+ +
+ + Highlight (only supported by Chrome) diff --git a/tabs-tabs-tabs/tabs.js b/tabs-tabs-tabs/tabs.js index 666e3e6..574fd9b 100644 --- a/tabs-tabs-tabs/tabs.js +++ b/tabs-tabs-tabs/tabs.js @@ -121,6 +121,13 @@ document.addEventListener("click", function(e) { }); }); } + // Currently (11/2/2016) only supported by Chrome + else if (e.target.id === "tabs-highlight") { // highlights current tab and next tab (cycles back to first tab if current tab is the last one) + callOnActiveTab((tab, tabs) => { + next = (tab.index+1) % tabs.length; + chrome.tabs.highlight({tabs:[tab.index, next]}); + }); + } e.preventDefault(); });