Skip to content

Commit 8131561

Browse files
committed
Fixed viewing the url of the current tab in the list of sites
1 parent cb82c9e commit 8131561

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/scripts/background.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ function backgroundCheck() {
4949
});
5050
} else {
5151
if (tab !== undefined) {
52-
if (!tab.url.isMatch(currentTab)) {
52+
if (currentTab == null || !tab.url.isHostMatch(currentTab.host)) {
5353
activity.setCurrentActiveTab(tab.url);
5454
}
5555
chrome.idle.queryState(parseInt(setting_interval_inactivity), function(state) {

src/scripts/ui.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ class UI {
197197
var spanUrl = this.createElement('span', ['span-url'], tabUrlString);
198198
spanUrl.setAttribute('href', 'https://' + tabUrlString);
199199

200-
if (tab.url.isMatch(currentTab)) {
200+
if (currentTab != null && tab.url.isHostMatch(currentTab.host)) {
201201
var divForImage = document.createElement('div');
202202
div.classList.add('span-active-url');
203203
var imgCurrentDomain = document.createElement('img');

0 commit comments

Comments
 (0)