Skip to content
This repository was archived by the owner on Sep 5, 2020. It is now read-only.

Commit

Permalink
cleanup customProtocols.js (#4131)
Browse files Browse the repository at this point in the history
  • Loading branch information
marlomajor authored and evertonfraga committed Nov 13, 2018
1 parent ba324fc commit 7ac7ec3
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions customProtocols.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ const { protocol } = require('electron');
protocol.registerHttpProtocol(
'mist',
(request, callback) => {
// callback({mimeType: 'text/html', data: Buffer.from('<h5>Response</h5>')});

console.log(
request.url.indexOf('mist://interface') !== -1
? global.interfaceAppUrl + request.url.replace('mist://interface', '')
Expand All @@ -15,14 +13,11 @@ protocol.registerHttpProtocol(
url:
request.url.indexOf('mist://interface') !== -1
? global.interfaceAppUrl + request.url.replace('mist://interface', '')
: '', // 'http://localhost:3050/' + request.url.replace('mist://',''),
: '',
method: request.method,
referrer: request.referrer
};

console.log(call);
// console.log(call);

callback(call);
},
error => {
Expand All @@ -31,15 +26,3 @@ protocol.registerHttpProtocol(
}
}
);

// protocol.registerProtocol('eth', function(request) {
// var url = request.url.substr(7)
// return new protocol.RequestStringJob({data: 'Hello'});
// });

// protocol.registerProtocol('bzz', function(request) {
// var url = request.url.substr(7)
// return new protocol.RequestStringJob({data: 'Hello'});
// });

// protocol.registerStandardSchemes(['mist','eth', 'bzz']); //'eth', 'bzz'

0 comments on commit 7ac7ec3

Please sign in to comment.