switch ext: proto to blob:

This commit is contained in:
Paul Frazee 2015-06-25 11:16:23 -05:00
parent 8c48c4000e
commit 616af83706
3 changed files with 5 additions and 2 deletions

View File

@ -22,5 +22,8 @@
<script src="../node_modules/scuttlebot/node_modules/ssbplug-phoenix/js/canvas-to-blob.js"></script>
<script src="../node_modules/scuttlebot/node_modules/ssbplug-phoenix/js/sigma.min.js"></script>
<script src="../node_modules/scuttlebot/node_modules/ssbplug-phoenix/js/home.js"></script>
<script>
// require('../node_modules/scuttlebot/node_modules/ssbplug-phoenix/src/home')
</script>
</body>
</html>

View File

@ -20,7 +20,7 @@ app.on('ready', function ready () {
// start sbot
require('scuttlebot').init(config, function (err, sbot) {
// register protocols
require('protocol').registerProtocol('ext', require('./lib/ext-protocol')(config))
require('protocol').registerProtocol('blob', require('./lib/blob-protocol')(config))
// open the web app
mainWindow = new BrowserWindow({width: 1000, height: 720})
@ -30,7 +30,7 @@ app.on('ready', function ready () {
function onNewWindow (e, url) {
e.preventDefault() // hell naw
if (url.indexOf('ext:') === 0) {
if (url.indexOf('blob:') === 0) {
// open the file
var id = url.split(':')[1]
shell.openItem(toPath(blobs_dir, id))