switch ext: proto to blob:
This commit is contained in:
parent
8c48c4000e
commit
616af83706
@ -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>
|
||||
|
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user