(tabId)
| 184 | } |
| 185 | |
| 186 | function favoriteFromTab(tabId) { |
| 187 | if (!isValidTabId(tabId)) { |
| 188 | console.log('Invalid tab ID'); |
| 189 | return; |
| 190 | } |
| 191 | |
| 192 | let tab = tabs.get(tabId); |
| 193 | let favicon = tab.favicon == 'img/favicon.png' ? '../controls_ui/' + tab.favicon : tab.favicon; |
| 194 | return { |
| 195 | uri: tab.uri, |
| 196 | uriToShow: tab.uriToShow, |
| 197 | title: tab.title, |
| 198 | favicon: favicon |
| 199 | }; |
| 200 | } |
| 201 | |
| 202 | function historyItemFromTab(tabId) { |
| 203 | if (!isValidTabId(tabId)) { |
no test coverage detected