God bless Firefox v129
This commit is contained in:
@ -95,11 +95,15 @@ const PortraitForm = (props: PortraitFormProps) => {
|
||||
deleteFile(fileIdRef.current)
|
||||
|
||||
if (navigator.userAgent.match(/firefox|fxios/i)) {
|
||||
// Dear Mozilla, please implement keepalive on Firefox
|
||||
// Sincerely, everybody
|
||||
const time = Date.now()
|
||||
while (Date.now() - time < 500) {
|
||||
/* empty */
|
||||
const firefoxVer = Number(navigator.userAgent.match(/Firefox\/(\d+)/)[1])
|
||||
|
||||
// One day dom.fetchKeepalive.enabled becomes true by default... until then!
|
||||
if (firefoxVer < 129) {
|
||||
const time = Date.now()
|
||||
|
||||
while (Date.now() - time < 500) {
|
||||
/* empty */
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user