diff --git a/JS/expanded.js b/JS/expanded.js index ab48295..931b266 100644 --- a/JS/expanded.js +++ b/JS/expanded.js @@ -117,6 +117,9 @@ async function GetPost() { } // Text. This will be modified later. var Text = post.post.record.text; + console.log(Text); + var TestText = Text.replace(/\r?\n|\r/g, ""); + console.log(TestText); // Check for facets. Facets are things that change what the text does or looks like. if (post.post.record.hasOwnProperty("facets")) { for (let i of post.post.record.facets) { @@ -132,6 +135,7 @@ async function GetPost() { } } // Place the text. + Text = Text.replace(/\r?\n|\r/g, "
"); document.getElementsByClassName("PostText Regular")[0].innerHTML = Text; // Show the image if it exists. if (post.post.record.hasOwnProperty("embed")) { diff --git a/JS/index.js b/JS/index.js index 93a595c..9df50e3 100644 --- a/JS/index.js +++ b/JS/index.js @@ -286,6 +286,7 @@ async function PosterContainerUpdate(Direction) { } } } + TempText = TempText.replace(/\r?\n|\r/g, "
"); i.getElementsByClassName("PostContent")[0].innerHTML += TempText; break; case 2: