Commit 87e8dd5ccef51221cc20ce6c491bfcb4d106f63b
remove a bunch of unused constants (thanks standard!)
mix irving committed on 1/16/2017, 8:52:59 AMParent: 010c28ba45ecc8a029b813a3cd9e7edc8e098059
Files changed
modules_basic/avatar-edit.js | changed |
modules_basic/avatar-image.js | changed |
modules_basic/avatar.js | changed |
modules_basic/compose.js | changed |
modules_basic/follow.js | changed |
modules_basic/like.js | changed |
modules_basic/message.js | changed |
modules_basic/post.js | changed |
modules_basic/search-box.js | changed |
modules_basic/setup.js | changed |
modules_basic/suggest-mentions.js | changed |
modules_basic/thread.js | changed |
modules_core/app.js | changed |
modules_core/file-input.js | changed |
modules_core/message-confirm.js | changed |
modules_core/styles.js | changed |
modules_core/tabs.js | changed |
modules_extra/channel.js | changed |
modules_extra/key.js | changed |
modules_extra/meta-image.js | changed |
modules_extra/raw.js | changed |
modules_basic/avatar-edit.js | ||
---|---|---|
@@ -10,9 +10,8 @@ | ||
10 | 10 … | var visualize = require('visualize-buffer') |
11 | 11 … | var self_id = require('../keys').id |
12 | 12 … | |
13 | 13 … | function crop (d, cb) { |
14 | - var data | |
15 | 14 … | var canvas = hypercrop(h('img', {src: d})) |
16 | 15 … | |
17 | 16 … | return h('div.column.avatar_pic', |
18 | 17 … | canvas, |
@@ -46,9 +45,9 @@ | ||
46 | 45 … | |
47 | 46 … | var lb = hyperlightbox() |
48 | 47 … | var name_input = h('input', {placeholder: 'rename'}) |
49 | 48 … | var name = api.avatar_name(id) |
50 | - var selected = null, selected_data = null | |
49 … | + var selected = null | |
51 | 50 … | |
52 | 51 … | getAvatar({links: api.sbot_links}, self_id, id, function (err, avatar) { |
53 | 52 … | if (err) return console.error(err) |
54 | 53 … | //don't show user has already selected an avatar. |
modules_basic/avatar-image.js | |||
---|---|---|---|
@@ -1,9 +1,6 @@ | |||
1 | 1 … | ||
2 | -var getAvatar = require('ssb-avatar') | ||
3 | 2 … | var h = require('hyperscript') | |
4 | -var ref = require('ssb-ref') | ||
5 | -var path = require('path') | ||
6 | 3 … | var visualize = require('visualize-buffer') | |
7 | 4 … | ||
8 | 5 … | var pull = require('pull-stream') | |
9 | 6 … | ||
@@ -17,14 +14,8 @@ | |||
17 | 14 … | exports.gives = { | |
18 | 15 … | connection_status: true, avatar_image: true | |
19 | 16 … | } | |
20 | 17 … | ||
21 | - | ||
22 | -function isFunction (f) { | ||
23 | - return 'function' === typeof f | ||
24 | -} | ||
25 | - | ||
26 | - | ||
27 | 18 … | var ready = false | |
28 | 19 … | var waiting = [] | |
29 | 20 … | ||
30 | 21 … | var last = 0 |
modules_basic/avatar.js | ||
---|---|---|
@@ -1,6 +1,4 @@ | ||
1 | -var h = require('hyperscript') | |
2 | -var u = require('../util') | |
3 | 1 … | |
4 | 2 … | exports.needs = { |
5 | 3 … | avatar_name: 'first', |
6 | 4 … | avatar_image: 'first', |
modules_basic/compose.js | ||
---|---|---|
@@ -1,8 +1,7 @@ | ||
1 | 1 … | |
2 | 2 … | const fs = require('fs') |
3 | 3 … | const h = require('../h') |
4 | -const u = require('../util') | |
5 | 4 … | const suggest = require('suggest-box') |
6 | 5 … | const mentions = require('ssb-mentions') |
7 | 6 … | const cont = require('cont') |
8 | 7 … |
modules_basic/follow.js | ||
---|---|---|
@@ -1,7 +1,5 @@ | ||
1 | 1 … | var h = require('hyperscript') |
2 | -var u = require('../util') | |
3 | -var pull = require('pull-stream') | |
4 | 2 … | |
5 | 3 … | //render a message when someone follows someone, |
6 | 4 … | //so you see new users |
7 | 5 … | function isRelated(value, name) { |
modules_basic/like.js | ||
---|---|---|
@@ -1,6 +1,5 @@ | ||
1 | 1 … | var h = require('hyperscript') |
2 | -var u = require('../util') | |
3 | 2 … | var pull = require('pull-stream') |
4 | 3 … | |
5 | 4 … | exports.needs = { |
6 | 5 … | avatar_name: 'first', |
modules_basic/message.js | ||
---|---|---|
@@ -1,7 +1,5 @@ | ||
1 | 1 … | const fs = require('fs') |
2 | -const pull = require('pull-stream') | |
3 | -const u = require('../util') | |
4 | 2 … | const h = require('../h') |
5 | 3 … | |
6 | 4 … | exports.needs = { |
7 | 5 … | avatar_name: 'first', |
modules_basic/post.js | ||
---|---|---|
@@ -1,8 +1,5 @@ | ||
1 | -var markdown = require('ssb-markdown') | |
2 | 1 … | var h = require('hyperscript') |
3 | -var u = require('../util') | |
4 | -var ref = require('ssb-ref') | |
5 | 2 … | |
6 | 3 … | //render a message |
7 | 4 … | |
8 | 5 … | exports.needs = { |
modules_basic/search-box.js | ||
---|---|---|
@@ -1,17 +1,14 @@ | ||
1 | 1 … | |
2 | 2 … | var cont = require('cont') |
3 | 3 … | var h = require('hyperscript') |
4 | 4 … | var suggest = require('suggest-box') |
5 | -var pull = require('pull-stream') | |
6 | 5 … | |
7 | 6 … | exports.needs = { |
8 | 7 … | sbot_query: 'first', sbot_links2: 'first', |
9 | 8 … | suggest_search: 'map' //REWRITE |
10 | 9 … | } |
11 | 10 … | |
12 | -var channels = [] | |
13 | - | |
14 | 11 … | exports.gives = 'search_box' |
15 | 12 … | |
16 | 13 … | exports.create = function (api) { |
17 | 14 … | |
@@ -49,10 +46,8 @@ | ||
49 | 46 … | search.value = sigil |
50 | 47 … | } |
51 | 48 … | } |
52 | 49 … | |
53 | - var suggestions = {} | |
54 | - | |
55 | 50 … | // delay until the element has a parent |
56 | 51 … | setTimeout(function () { |
57 | 52 … | suggestBox = suggest(search, function (word, cb) { |
58 | 53 … | cont.para(api.suggest_search(word)) |
modules_basic/setup.js | ||
---|---|---|
@@ -119,18 +119,15 @@ | ||
119 | 119 … | return joined |
120 | 120 … | } |
121 | 121 … | |
122 | 122 … | exports.screen_view = function (path) { |
123 | - | |
124 | 123 … | if(path !== '/setup') return |
125 | 124 … | |
126 | 125 … | var id = require('../keys').id |
127 | 126 … | |
128 | 127 … | //set up an avatar |
129 | 128 … | |
130 | - | |
131 | 129 … | var status = h('span') |
132 | - var invite = h('input', {placeholder: 'invite code'}) | |
133 | 130 … | return h('div.scroller', h('div.scroller__wrapper', |
134 | 131 … | h('h1', 'welcome to patchbay!'), |
135 | 132 … | h('div', |
136 | 133 … | 'please choose avatar image and name', |
modules_basic/suggest-mentions.js | ||
---|---|---|
@@ -1,8 +1,4 @@ | ||
1 | -var pull = require('pull-stream') | |
2 | -function isImage (filename) { | |
3 | - return /\.(gif|jpg|png|svg)$/i.test(filename) | |
4 | -} | |
5 | 1 … | |
6 | 2 … | exports.needs = { |
7 | 3 … | sbot_links2: 'first', |
8 | 4 … | blob_url: 'first', |
modules_basic/thread.js | ||
---|---|---|
@@ -1,11 +1,8 @@ | ||
1 | 1 … | var pull = require('pull-stream') |
2 | -var Cat = require('pull-cat') | |
3 | 2 … | var sort = require('ssb-sort') |
4 | 3 … | var ref = require('ssb-ref') |
5 | 4 … | var h = require('hyperscript') |
6 | -var u = require('../util') | |
7 | -var Scroller = require('pull-scroll') | |
8 | 5 … | var self_id = require('../keys').id |
9 | 6 … | |
10 | 7 … | function once (cont) { |
11 | 8 … | var ended = false |
modules_core/app.js | ||
---|---|---|
@@ -23,9 +23,8 @@ | ||
23 | 23 … | function hash() { |
24 | 24 … | return window.location.hash.substring(1) |
25 | 25 … | } |
26 | 26 … | |
27 | - console.log(hash() || 'tabs') | |
28 | 27 … | var view = api.screen_view(hash() || 'tabs') |
29 | 28 … | |
30 | 29 … | var screen = h('div.screen.column', view) |
31 | 30 … |
modules_core/file-input.js | ||
---|---|---|
@@ -1,5 +1,4 @@ | ||
1 | -var u = require('../util') | |
2 | 1 … | var h = require('hyperscript') |
3 | 2 … | var pull = require('pull-stream') |
4 | 3 … | var mime = require('simple-mime')('application/octect-stream') |
5 | 4 … | var split = require('split-buffer') |
modules_core/message-confirm.js | ||
---|---|---|
@@ -1,8 +1,7 @@ | ||
1 | 1 … | var fs = require('fs') |
2 | 2 … | var lightbox = require('hyperlightbox') |
3 | 3 … | var h = require('../h') |
4 | -var u = require('../util') | |
5 | 4 … | var self_id = require('../keys').id |
6 | 5 … | //publish or add |
7 | 6 … | |
8 | 7 … | exports.needs = { |
modules_core/styles.js | ||
---|---|---|
@@ -1,5 +1,4 @@ | ||
1 | -var h = require('../h') | |
2 | 1 … | var compile = require('micro-css') |
3 | 2 … | var fs = require('fs') |
4 | 3 … | var Path = require('path') |
5 | 4 … |
modules_core/tabs.js | ||
---|---|---|
@@ -1,8 +1,6 @@ | ||
1 | 1 … | var Tabs = require('hypertabs') |
2 | 2 … | var h = require('hyperscript') |
3 | -var pull = require('pull-stream') | |
4 | -var u = require('../util') | |
5 | 3 … | var keyscroll = require('../keyscroll') |
6 | 4 … | var open = require('open-external') |
7 | 5 … | |
8 | 6 … | function ancestor (el) { |
modules_extra/channel.js | ||
---|---|---|
@@ -1,6 +1,5 @@ | ||
1 | 1 … | var h = require('hyperscript') |
2 | -var u = require('../util') | |
3 | 2 … | var pull = require('pull-stream') |
4 | 3 … | var Scroller = require('pull-scroll') |
5 | 4 … | var mfr = require('map-filter-reduce') |
6 | 5 … |
modules_extra/key.js | ||
---|---|---|
@@ -1,8 +1,5 @@ | ||
1 | 1 … | var h = require('hyperscript') |
2 | -var u = require('../util') | |
3 | -var pull = require('pull-stream') | |
4 | -var Scroller = require('pull-scroll') | |
5 | 2 … | |
6 | 3 … | exports.gives = { |
7 | 4 … | menu_items: true, screen_view: true |
8 | 5 … | } |
@@ -16,10 +13,10 @@ | ||
16 | 13 … | if(path === '/key') { |
17 | 14 … | if(process.title === 'browser') { |
18 | 15 … | var importKey = h('textarea', {placeholder: 'import an existing public/private key', name: 'textarea'}) |
19 | 16 … | var importRemote = h('textarea', {placeholder: 'import an existing remote', name: 'textarea'}) |
20 | - var content = h('div.column.scroller__content') | |
21 | - var div = h('div.column.scroller', | |
17 … | + | |
18 … | + return h('div.column.scroller', | |
22 | 19 … | {style: {'overflow':'auto'}}, |
23 | 20 … | h('div.scroller__wrapper', |
24 | 21 … | h('div.column.scroller__content', |
25 | 22 … | h('div.message', |
@@ -44,9 +41,8 @@ | ||
44 | 41 … | ) |
45 | 42 … | ) |
46 | 43 … | ) |
47 | 44 … | ) |
48 | - return div | |
49 | 45 … | } else { |
50 | 46 … | return h('p', 'Your key is saved at .ssb/secret') |
51 | 47 … | } |
52 | 48 … | } |
Built with git-ssb-web