initialize router earlier, fixes ea5a7832

This commit is contained in:
tophf 2020-12-15 00:05:20 +03:00
parent df2e8221d2
commit f5fc6a91a3
2 changed files with 5 additions and 1 deletions

View File

@ -19,6 +19,8 @@ define(require => {
return {
update,
getSearch(key) {
return new URLSearchParams(location.search).get(key);
},

View File

@ -34,7 +34,6 @@ define(async require => {
} = require('./events');
msg.onExtension(onRuntimeMessage);
router.watch({hash: '#stylus-options'}, toggleEmbeddedOptions);
window.on('closeOptions', () => router.updateHash(''));
const query = router.getSearch('search');
@ -66,6 +65,9 @@ define(async require => {
].map(id => `--${id}:"${CSS.escape(t(id))}";`).join('')
}}`);
router.watch({hash: '#stylus-options'}, toggleEmbeddedOptions);
router.update();
if (!VIVALDI) {
fitSelectBoxInOpenDetails($('#filters'));
}