Increase shelf timeout

This commit is contained in:
Nils Maier 2019-09-04 13:19:32 +02:00
parent 994e7ad0a6
commit 2c18ddaaa8

View File

@ -25,6 +25,7 @@ import {
const PREROLL_HEURISTICS = /dl|attach|download|name|file|get|retr|^n$|\.(php|asp|py|pl|action|htm|shtm)/i;
const PREROLL_TIMEOUT = 10000;
const SHELF_TIMEOUT = 2000;
const setShelfEnabled = downloads.setShelfEnabled || function() {
@ -70,7 +71,7 @@ function parseDisposition(disp: MimeType) {
return "";
}
const reenableShelf = debounce(() => setShelfEnabled(true), 1000, true);
const reenableShelf = debounce(() => setShelfEnabled(true), SHELF_TIMEOUT, true);
type Header = {name: string; value: string};
interface Options {