@@ -32,9 +32,6 @@ const bookmarks = require('./bookmarks')
3232// module.exports = module.exports || {}
3333// module.exports.infiniteMessageArea =
3434
35-
36-
37-
3835async function createIfNotExists ( doc , contentType = 'text/turtle' , data = '' ) {
3936 const fetcher = UI . store . fetcher
4037 try {
@@ -60,14 +57,6 @@ async function createIfNotExists (doc, contentType = 'text/turtle', data = '') {
6057 return response
6158}
6259
63-
64-
65-
66-
67-
68-
69-
70-
7160export function infiniteMessageArea ( dom , kb , chatChannel , options ) {
7261 kb = kb || UI . store
7362 const ns = UI . ns
@@ -100,9 +89,10 @@ export function infiniteMessageArea (dom, kb, chatChannel, options) {
10089 /** Does a file exist on the web?
10190 * @returns {Boolean }
10291 */
92+ /*
10393 async function documentExists (doc) {
10494 try {
105- await kb . fetcher . load ( doc )
95+ await kb.fetcher.load(doc)
10696 } catch (err) {
10797 if (err.response.status === 404) {
10898 return false
@@ -113,7 +103,7 @@ export function infiniteMessageArea (dom, kb, chatChannel, options) {
113103 }
114104 return true
115105 }
116-
106+ */
117107 /* Form for a new message
118108 */
119109 function newMessageForm ( messageTable ) {
@@ -149,12 +139,12 @@ export function infiniteMessageArea (dom, kb, chatChannel, options) {
149139 sts . push ( new $rdf . Statement ( message , DCT ( 'created' ) , dateStamp , chatDocument ) )
150140 if ( me ) sts . push ( new $rdf . Statement ( message , ns . foaf ( 'maker' ) , me , chatDocument ) )
151141
152- function sendComplete ( ) {
142+ function sendComplete ( ) {
153143 var bindings = { '?msg' : message ,
154144 '?content' : content ,
155145 '?date' : dateStamp ,
156146 '?creator' : me }
157- var tr = renderMessage ( liveMessageTable , bindings , false , options , userContext ) // not green
147+ renderMessage ( liveMessageTable , bindings , false , options , userContext ) // not green
158148
159149 if ( ! text ) {
160150 field . value = '' // clear from out for reuse
@@ -163,7 +153,7 @@ export function infiniteMessageArea (dom, kb, chatChannel, options) {
163153 field . scrollIntoView ( newestFirst ) // allign bottom (top)
164154 field . focus ( ) // Start typing next line immediately
165155 field . select ( )
166- }
156+ }
167157 }
168158 if ( SERVER_MKDIRP_BUG && ( kb . fetcher . requested [ chatDocument . uri ] === undefined || kb . fetcher . requested [ chatDocument . uri ] === 404 ) ) {
169159 console . log ( '@@@ SERVER_MKDIRP_BUG: Should only happen once: create chat file: ' + chatDocument )
@@ -302,7 +292,7 @@ export function infiniteMessageArea (dom, kb, chatChannel, options) {
302292 '?date' : kb . any ( message , DCT ( 'created' ) ) ,
303293 '?content' : kb . any ( message , ns . sioc ( 'content' ) )
304294 }
305- var tr = renderMessage ( messageTable , bindings , messageTable . fresh , options , userContext ) // fresh from elsewhere
295+ renderMessage ( messageTable , bindings , messageTable . fresh , options , userContext ) // fresh from elsewhere
306296 }
307297
308298// ////////
0 commit comments