fix: off by one error + updated README

This commit is contained in:
Hendrik Eeckhaut
2024-06-13 11:21:50 +02:00
parent c41b4ff401
commit 3b8cd0fba3
2 changed files with 3 additions and 3 deletions

View File

@@ -42,7 +42,7 @@ at your option.
```
$ git clone https://github.com/novnc/websockify && cd websockify
$ ./docker/build.sh
$ docker run -it --rm -p 55688:80 novnc/websockify 80 api.twitter.com:443
$ docker run -it --rm -p 55688:80 novnc/websockify 80 api.x.com:443
```
## Running Websockify Docker Image

View File

@@ -61,7 +61,7 @@ function parseTwitterResp() {
const revealed = `"screen_name":"${params.screen_name}"`;
const selectionStart = bodyString.indexOf(revealed);
const selectionEnd =
selectionStart + revealed.length - 1;
selectionStart + revealed.length;
const secretResps = [
bodyString.substring(0, selectionStart),
bodyString.substring(selectionEnd, bodyString.length),
@@ -98,7 +98,7 @@ function config() {
steps: [
{
title: 'Visit Twitter website',
cta: 'Go to twitter.com',
cta: 'Go to x.com',
action: 'start',
},
{