Browse Source

fix console warning for decodeShortURI()

readme-update
Simon Grim 9 years ago
parent
commit
7542eddf5b
  1. 7
      js/interface_common.js
  2. 2
      js/twister_io.js

7
js/interface_common.js

@ -833,16 +833,17 @@ function fetchShortenedURI(req) { @@ -833,16 +833,17 @@ function fetchShortenedURI(req) {
return;
}
decodeshorturl( req,
decodeShortURI(req,
function (req, ret) {
if (ret) {
twister.URIs[req] = ret;
$.localStorage.set('twistaURIs', twister.URIs);
applyShortenedURI(req, ret);
} else {
console.warn('can\'t fetch URI "' + req + '": ' + ret.message);
console.warn('can\'t fetch URI "' + req + '": null response');
}
}, req);
}, req
);
}
function applyShortenedURI(short, long) {

2
js/twister_io.js

@ -163,7 +163,7 @@ function _decodeshorturlInternal(locator, timeoutArgs) { @@ -163,7 +163,7 @@ function _decodeshorturlInternal(locator, timeoutArgs) {
_dhtgetDequeue();
}, locator,
function(req, ret) {
console.warn('can\'t fetch URI "' + req + '" — RPC "decodeshorturl" error: ' + (ret && ret.message) ? ret.message : ret);
console.warn('RPC "decodeshorturl" error: ' + (ret && ret.message) ? ret.message : ret);
_dhtgetsInProgress--;
_dhtgetAbortPending(req);
_dhtgetDequeue();

Loading…
Cancel
Save