frontend for xcvr appview

offset by junkword length to maintain total length

+1 -1
+1 -1
src/lib/wscontext.svelte.ts
··· 77 const nb = Math.floor(1.0 * body.length * this.beepcoefficient / this.junkword.length) 78 for (let i = 0; i < nb; i++) { 79 const start = Math.floor((body.length - this.junkword.length) * Math.random()) 80 - body = body.slice(0, start) + this.junkword + body.slice(start + 4) 81 } 82 } 83 console.log(body)
··· 77 const nb = Math.floor(1.0 * body.length * this.beepcoefficient / this.junkword.length) 78 for (let i = 0; i < nb; i++) { 79 const start = Math.floor((body.length - this.junkword.length) * Math.random()) 80 + body = body.slice(0, start) + this.junkword + body.slice(start + this.junkword.length) 81 } 82 } 83 console.log(body)