This repository has been archived on 2024-10-25. You can view files and clone it, but cannot push or open issues or pull requests.
CrunchyDL/components/Functions/WindowHandler.ts

9 lines
272 B
TypeScript
Raw Normal View History

2024-04-16 20:20:30 +02:00
const isProduction = process.env.NODE_ENV !== 'development'
export function openNewWindow(urlprod: string, urldev: string, w: string) {
2024-05-01 01:45:45 +02:00
const newWindow = window.open(isProduction ? urlprod : urldev, '_blank', w)
if (newWindow) {
newWindow.focus()
}
}