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 { return {
update,
getSearch(key) { getSearch(key) {
return new URLSearchParams(location.search).get(key); return new URLSearchParams(location.search).get(key);
}, },

View File

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