Shut up tampermonkey about redefined variables

This commit is contained in:
Calvin Montgomery 2016-08-15 21:16:14 -07:00
parent ba9fbea1a1
commit 8d3b2e59df

View file

@ -54,13 +54,14 @@
url: url,
onload: function (res) {
var data = {};
var error;
res.responseText.split('&').forEach(function (kv) {
var pair = kv.split('=');
data[decodeURIComponent(pair[0])] = decodeURIComponent(pair[1]);
});
if (data.status === 'fail') {
var error = new Error('Google Docs request failed: ' +
error = new Error('Google Docs request failed: ' +
'metadata indicated status=fail');
error.response = res.responseText;
error.reason = 'RESPONSE_STATUS_FAIL';
@ -68,7 +69,7 @@
}
if (!data.fmt_stream_map) {
var error = new Error('Google Docs request failed: ' +
error = new Error('Google Docs request failed: ' +
'metadata lookup returned no valid links');
error.response = res.responseText;
error.reason = 'MISSING_LINKS';