From 3c1419ad3bfa9a57e7a30e1e5d2897e8ccd270d0 Mon Sep 17 00:00:00 2001 From: gorhill Date: Sat, 26 Sep 2015 11:10:10 -0400 Subject: [PATCH] this addresses https://github.com/gorhill/uBlock/issues/724 --- src/js/assets.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/js/assets.js b/src/js/assets.js index 362c1d2..a4a13c1 100644 --- a/src/js/assets.js +++ b/src/js/assets.js @@ -61,6 +61,7 @@ var lastRepoMetaTimestamp = 0; var lastRepoMetaIsRemote = false; var refreshRepoMetaPeriod = 5 * oneHour; var errorCantConnectTo = vAPI.i18n('errorCantConnectTo'); +var xhrTimeout = vAPI.localStorage.getItem('xhrTimeout') || 30000; var exports = { autoUpdate: true, @@ -318,7 +319,7 @@ var getTextFileFromURL = function(url, onLoad, onError) { var xhr = new XMLHttpRequest(); try { xhr.open('get', url, true); - xhr.timeout = 30000; + xhr.timeout = xhrTimeout; xhr.onload = onResponseReceived; xhr.onerror = onErrorReceived; xhr.ontimeout = onErrorReceived;