Browse Source

switch ext: proto to blob:

Paul Frazee 5 years ago
parent
commit
616af83706
3 changed files with 5 additions and 2 deletions
  1. 3
    0
      app/index.html
  2. 2
    2
      app/index.js
  3. 0
    0
      app/lib/blob-protocol.js

+ 3
- 0
app/index.html View File

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

+ 2
- 2
app/index.js View File

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

app/lib/ext-protocol.js → app/lib/blob-protocol.js View File


Loading…
Cancel
Save