anchor.diff:  
       print('$_host:$_port');
     }
  +}
  +
  +
  +class WebRequestRedirect {
  +  final HostServerSettings settings;
  +
  +  WebRequestRedirect(JsObject chromeWebRequest, this.settings) {
  +    dartifyChromeEvent(chromeWebRequest, 'onBeforeRequest').callMethod('addListener', [
  +      _onBeforeRequestAction,
  +      new JsObject.jsify({
  +        'urls': ['http://gateway.ipfs.io/ipfs/*', 'http://gateway.ipfs.io/ipns/*']
  +      }),
  +      new JsObject.jsify(['blocking'])
  +    ]);
  +  }
  +
   
     JsObject _onBeforeRequestAction(JsObject data) {
       var ipfsUrl = data['url'];
  -    var localhostUrl = Uri.parse(ipfsUrl).replace(host: _host, port: _port);
  +    var localhostUrl = Uri.parse(ipfsUrl).replace(host: settings.host, port: settings.port);
       var response = {
         'redirectUrl': localhostUrl.toString()
       };
  
positive.code: library ipfs_interceptor;
  
  import 'dart:html';
  import 'dart:js';
  
  
negative.code: 
  
  void main() {
    var settings = new HostServerSettings(_runtime);
    settings.changes.listen((_) => _setupPageStateMatcher(settings));
  
    addListenerToChromeEvent(_runtime, 'onInstalled', (_) {
      _setupPageStateMatcher(settings);
    });
  
    // A page action is the little icon that appears in the URL bar.
    addListenerToChromeEvent(_pageAction, 'onClicked', _pageActionOnClickedAction);
  
    _addContextMenu();
    new WebRequestRedirect(_webRequest, settings);
  }
  
  
  