Isolate new tab code and stop auto focus
Committed 6d843d
--- a/web.ts/index.ts
+++ b/web.ts/index.ts
export function go(url) {
if (url.startsWith("/http")) {
- window.open(url.substring(1), "_blank").focus()
+ window.open(url.substring(1), "_blank")
+ } else {
+ history.replaceState({scroll: window.pageYOffset}, "title", window.location.href)
+ updateArticle(url, 0)
+ history.pushState({scroll: 0}, "title", url)
}
- history.replaceState({scroll: window.pageYOffset}, "title", window.location.href)
- updateArticle(url, 0)
- history.pushState({scroll: 0}, "title", url)
}