Skip to content

Commit

Permalink
Apply group tab title correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Oct 4, 2020
1 parent 2ac7109 commit 93a822f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions webextensions/resources/group-tab.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,11 @@
function getTitle() {
let title = params.get('title');
if (!title) {
title = location.search.match(/^\?([^&;]*)/);
const matched = location.search.match(/^\?([^&;]*)/);
if (matched)
title = decodeURIComponent(matched[1]);
}
return title && decodeURIComponent(title[1]) ||
browser.i18n.getMessage('groupTab_label_default');
return title || browser.i18n.getMessage('groupTab_label_default');
}

function setTitle(title) {
Expand Down

0 comments on commit 93a822f

Please sign in to comment.