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

Commit

Permalink
Merge pull request #26 from ethereum/functionality
Browse files Browse the repository at this point in the history
add custom protocol dummy file
  • Loading branch information
frozeman committed Jun 22, 2015
2 parents ec8edc9 + e7de0ea commit 629e581
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
15 changes: 15 additions & 0 deletions customProtocols.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
const protocol = require('protocol');


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


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'});
});
6 changes: 6 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const app = require('app'); // Module to control application life.
const BrowserWindow = require('browser-window'); // Module to create native browser window.
const ipc = require('ipc');

// const Menu = require('menu');
// const Tray = require('tray');
const menuItems = require('./menuItems');
Expand Down Expand Up @@ -41,6 +42,11 @@ app.on('activate-with-no-open-windows', function () {
// initialization and ready for creating browser windows.
app.on('ready', function() {

// instantiate custom protocols
// require('./customProtocols.js');



// appIcon = new Tray('./icons/icon-tray.png');
// var contextMenu = Menu.buildFromTemplate([
// { label: 'Item1', type: 'radio' },
Expand Down

0 comments on commit 629e581

Please sign in to comment.