@@ -154,23 +154,21 @@ class NodeJsDB1 {
154154 }
155155
156156 async public ( opts ) {
157- console . time ( "ssb.public" )
158157 opts = opts || { }
159158 opts . reverse = opts . reverse || true
160159
161160 const pipeline = pipelines . thread . get ( )
162161 const filter = opts . filter
163162 let selectedFilter
164- console . time ( "Getting friends graph" )
163+ // console.time("Getting friends graph")
165164 let friends = await friendship . friendsAsArray ( sbot . id )
166- console . timeEnd ( "Getting friends graph" )
167- console . time ( "Getting following graph" )
165+ // console.timeEnd("Getting friends graph")
166+ // console.time("Getting following graph")
168167 let following = await friendship . followingAsArray ( sbot . id )
169- console . timeEnd ( "Getting following graph" )
168+ // console.timeEnd("Getting following graph")
170169
171- // console.log("friends", friends)
172- // console.log("following", following)
173-
170+ // console.log("friends", friends)
171+ // console.log("following", following)
174172
175173 // so you don't filter yourself out.
176174 friends . push ( sbot . id )
@@ -204,8 +202,6 @@ class NodeJsDB1 {
204202 // })
205203 // }, 5),
206204 pull . collect ( ( err , msgs ) => {
207- console . timeEnd ( "ssb.public" )
208-
209205 if ( err ) {
210206 reject ( err )
211207 }
@@ -623,25 +619,24 @@ class NodeJsDB1 {
623619 function replaceFeedID ( match , id , offset , string ) {
624620 let eid = encodeURIComponent ( `@${ id } ` )
625621 return (
626- // eslint-disable-next-line quotes
627- '<a class="link link-accent profile-link" href="?pkg=contacts&view=profile&feed=' + eid + identity
622+ `<a class="link link-accent profile-link" href="?pkg=contacts&view=profile&feed=` + eid + identity
628623 )
629624 }
630625
631626 function replaceImageLinks ( match , id , offset , string ) {
632- return `<a class="link link-accent image-link" target="_blank" href="${ patchfox . httpUrl ( "/blobs/get/&" ) } ` + encodeURIComponent ( id )
627+ return `<a class="link link-accent image-link" target="_blank" href="${ patchfox . httpUrl ( "/blobs/get/&" ) } ` + id
633628 }
634629
635630 function replaceImages ( match , id , offset , string ) {
636- return `<img class="is-image-from-blob" src="${ patchfox . httpUrl ( "/blobs/get/&" ) } ` + encodeURIComponent ( id )
631+ return `<img class="is-image-from-blob" src="${ patchfox . httpUrl ( "/blobs/get/&" ) } ` + id
637632 }
638633
639634 function replaceVideos ( match , id , offset , string ) {
640- return `<video controls class="is-video-from-blob" src="${ patchfox . httpUrl ( "/blobs/get/&" ) } ` + encodeURIComponent ( id )
635+ return `<video controls class="is-video-from-blob" src="${ patchfox . httpUrl ( "/blobs/get/&" ) } ` + id
641636 }
642637
643638 function replaceAudios ( match , id , offset , string ) {
644- return `<audio controls class="is-audio-from-blob" src="${ patchfox . httpUrl ( "/blobs/get/&" ) } ` + encodeURIComponent ( id )
639+ return `<audio controls class="is-audio-from-blob" src="${ patchfox . httpUrl ( "/blobs/get/&" ) } ` + id
645640 }
646641
647642 let opts = {
@@ -657,8 +652,8 @@ class NodeJsDB1 {
657652 . replace ( / t a r g e t = " _ b l a n k " / gi, "" )
658653 . replace ( / < a h r e f = " % ( [ ^ " ] * ) / gi, replaceMsgID )
659654 . replace ( / < i m g s r c = " & ( [ ^ " ] * ) / gi, replaceImages )
660- . replace ( / < v i d e o c o n t r o l s s r c = " & ( [ ^ " ] * ) / gi, replaceVideos )
661- . replace ( / < a u d i o c o n t r o l s s r c = " & ( [ ^ " ] * ) / gi, replaceAudios )
655+ . replace ( / < v i d e o s r c = " & ( [ ^ " ] * ) / gi, replaceVideos )
656+ . replace ( / < a u d i o s r c = " & ( [ ^ " ] * ) / gi, replaceAudios )
662657 . replace ( / < a h r e f = " & ( [ ^ " ] * ) / gi, replaceImageLinks )
663658 . replace ( / < a h r e f = " ( [ ^ " ] * ) / gi, replaceLinks )
664659
0 commit comments