Simplify newtab redirect code

This commit is contained in:
Colin Caine 2018-04-19 16:33:17 +01:00
parent a11d7704a8
commit 07b0a20923

View file

@ -57,8 +57,5 @@ if (
window.location.protocol === "moz-extension:" &&
window.location.pathname === "/static/newtab.html"
) {
;(window as any).tri.config.getAsync("newtab").then(newtab => {
if (newtab !== "")
window.location.href = (window as any).tri.excmds.forceURI(newtab)
})
config.getAsync("newtab").then(newtab => newtab && excmds.open(newtab))
}