mirror of https://github.com/calzoneman/sync.git
Shut up tampermonkey about redefined variables
This commit is contained in:
parent
ba9fbea1a1
commit
8d3b2e59df
|
@ -54,13 +54,14 @@
|
||||||
url: url,
|
url: url,
|
||||||
onload: function (res) {
|
onload: function (res) {
|
||||||
var data = {};
|
var data = {};
|
||||||
|
var error;
|
||||||
res.responseText.split('&').forEach(function (kv) {
|
res.responseText.split('&').forEach(function (kv) {
|
||||||
var pair = kv.split('=');
|
var pair = kv.split('=');
|
||||||
data[decodeURIComponent(pair[0])] = decodeURIComponent(pair[1]);
|
data[decodeURIComponent(pair[0])] = decodeURIComponent(pair[1]);
|
||||||
});
|
});
|
||||||
|
|
||||||
if (data.status === 'fail') {
|
if (data.status === 'fail') {
|
||||||
var error = new Error('Google Docs request failed: ' +
|
error = new Error('Google Docs request failed: ' +
|
||||||
'metadata indicated status=fail');
|
'metadata indicated status=fail');
|
||||||
error.response = res.responseText;
|
error.response = res.responseText;
|
||||||
error.reason = 'RESPONSE_STATUS_FAIL';
|
error.reason = 'RESPONSE_STATUS_FAIL';
|
||||||
|
@ -68,7 +69,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!data.fmt_stream_map) {
|
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');
|
'metadata lookup returned no valid links');
|
||||||
error.response = res.responseText;
|
error.response = res.responseText;
|
||||||
error.reason = 'MISSING_LINKS';
|
error.reason = 'MISSING_LINKS';
|
||||||
|
|
Loading…
Reference in New Issue