anchor.diff:      });
     }
   
  -  void _onErrorAction(JsObject details) {
  -    // Chrome will give an error message, but there isn't a defined way of
  -    // identifying the problem. Nor is there a way to tell Chrome how to
  -    // resolve the problem. Luckily Chrome will automatically reattempt the
  -    // request. We just have to be ready for it.
  -    _errorMode = true;
  -    _lastErrorTime = new DateTime.now();
  -    _setRequestListener();
  -  }
  -
  -  JsObject _onBeforeRequestAction(JsObject data) {
  +  void _generateRequestUrls() {
  +    var urls = makeIpfsGlobs('file://');
  +    if (_errorMode) {
  +      urls.addAll(makeIpfsGlobs(settings.server));
  +    } else {
  +      urls.addAll(makeIpfsGlobs('http://gateway.ipfs.io'));
  +    }
  +    _ipfsRequestUrls = urls.map((url) => Uri.parse(url)).toList(growable: false);
  +  }
  +
  +  bool _isIpfsUrl(Uri url) {
  +    bool urlMatch = false;
  +    if (url.pathSegments.isNotEmpty &&
  +        (url.pathSegments.first == 'ipfs' || url.pathSegments.first == 'ipns')) {
  +      urlMatch = url.host == settings.host && url.port == settings.port;
  +
  +      for (int i = 0; i < _ipfsRequestUrls.length && !urlMatch; ++i) {
  +        urlMatch = _ipfsRequestUrls[i].host == url.host &&
  +                    _ipfsRequestUrls[i].port == url.port;
  +      }
  +    }
  +
  +    return urlMatch;
  +  }
  +
  +  String _handleIpfsRequest(JsObject data, Uri ipfsUrl) {
       if (_errorMode &&
           new DateTime.now().difference(_lastErrorTime) > _ERROR_COOL_DOWN_PERIOD) {
         _errorMode = false;
  +      _generateRequestUrls();
         _setRequestListener();
       }
   
  -    var ipfsUrl = Uri.parse(data['url']);
       if (ipfsUrl.scheme == 'file') {
         ipfsUrl = _parseFileUrl(data['url']);
       }
  
positive.code:     } else {
        localUrl = ipfsUrl.replace(scheme: 'http', host: 'gateway.ipfs.io', port: 80);
      }
  
      return new JsObject.jsify({
        'redirectUrl': localUrl.toString()
      });
    }
  
    /**
  
negative.code: 
    bool _errorMode = false;
    var _lastErrorTime = new DateTime(0);
    List<Uri> _ipfsRequestUrls;
  
    WebRequestRedirect(this.chromeWebRequest, this.settings) {
      _generateRequestUrls();
      _setErrorListener();
      _setRequestListener();
  
  