This commit is contained in:
parent
f792087171
commit
d140479ecc
1 changed files with 2 additions and 1 deletions
|
@ -202,7 +202,8 @@ document.addEventListener('DOMContentLoaded', () => fetch('./map.json').then(r =
|
||||||
document.getElementById('sort').value = prefs['popup-sort'];
|
document.getElementById('sort').value = prefs['popup-sort'];
|
||||||
|
|
||||||
chrome.runtime.getBackgroundPage(bg => {
|
chrome.runtime.getBackgroundPage(bg => {
|
||||||
const ua = bg.prefs.ua || navigator.userAgent;
|
// Firefox in private mode -> there is no bg!
|
||||||
|
const ua = (bg ? bg.prefs.ua : '') || navigator.userAgent;
|
||||||
update(ua);
|
update(ua);
|
||||||
document.getElementById('ua').value = ua;
|
document.getElementById('ua').value = ua;
|
||||||
document.getElementById('ua').dispatchEvent(new Event('input'));
|
document.getElementById('ua').dispatchEvent(new Event('input'));
|
||||||
|
|
Loading…
Reference in a new issue