fixes #101
This commit is contained in:
parent
fa8ff3c95c
commit
f9214d27fb
5 changed files with 30 additions and 5 deletions
|
@ -40,8 +40,8 @@
|
|||
<th>
|
||||
<input type="search" id="custom" placeholder="Filter items">
|
||||
<select id="sort">
|
||||
<option value="descending">Z to A</option>
|
||||
<option value="ascending">A to Z</option>
|
||||
<option value="descending" data-localize="ztoa">Z to A</option>
|
||||
<option value="ascending" data-localize="atoz">A to Z</option>
|
||||
</select>
|
||||
</th>
|
||||
</tr>
|
||||
|
|
|
@ -8,7 +8,6 @@ document.querySelectorAll('[data-localized-value]').forEach(e => {
|
|||
e.value = translated;
|
||||
}
|
||||
});
|
||||
|
||||
document.querySelectorAll('[data-localized-title]').forEach(e => {
|
||||
const ref = e.dataset.localizedTitle;
|
||||
const translated = chrome.i18n.getMessage(ref);
|
||||
|
@ -16,6 +15,13 @@ document.querySelectorAll('[data-localized-title]').forEach(e => {
|
|||
e.title = translated;
|
||||
}
|
||||
});
|
||||
document.querySelectorAll('[data-localize]').forEach(e => {
|
||||
const ref = e.dataset.localize;
|
||||
const translated = chrome.i18n.getMessage(ref);
|
||||
if (translated) {
|
||||
e.textContent = translated;
|
||||
}
|
||||
});
|
||||
|
||||
const DCSI = 'firefox-default';
|
||||
|
||||
|
@ -155,7 +161,7 @@ function update(ua) {
|
|||
inline: 'nearest'
|
||||
});
|
||||
}
|
||||
document.getElementById('custom').placeholder = `Filter among ${list.length}`;
|
||||
document.getElementById('custom').placeholder = chrome.i18n.getMessage('filterAmong', [list.length]);
|
||||
[...document.getElementById('os').querySelectorAll('option')].forEach(option => {
|
||||
option.disabled = (map.matching[browser.toLowerCase()] || []).indexOf(option.value.toLowerCase()) === -1;
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue