final arrow fix for now
This commit is contained in:
parent
64b116d647
commit
6035188380
2 changed files with 59 additions and 2 deletions
7
index.js
7
index.js
|
@ -21,11 +21,14 @@ async function addMsg(msg) {
|
|||
var item = document.createElement('li');
|
||||
item.textContent = line;
|
||||
|
||||
if (line.startsWith('-') || line.startsWith('<')) {
|
||||
if (line[0] == '-' ||line[0] == '<' ) {
|
||||
let img = new Image();
|
||||
if (line.startsWith('<') || line[2] == '>') {
|
||||
if (line[0] == '<' ) {
|
||||
item.textContent = line.slice(3);
|
||||
img.src = `arrows/left.svg`;
|
||||
} else if (line[1] == '>') {
|
||||
item.textContent = line.slice(3);
|
||||
img.src = `arrows/cap.svg`;
|
||||
} else {
|
||||
item.textContent = line.slice(2);
|
||||
img.src = `arrows/right.svg`;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue