diff --git a/src/components/Board.jsx b/src/components/Board.jsx index 1b2c95fc..1a66afdc 100644 --- a/src/components/Board.jsx +++ b/src/components/Board.jsx @@ -280,10 +280,18 @@ const Board = ({ setBodyStyle }) => { const targetElement = [...document.querySelectorAll('.post-reply')] .find(el => el.innerHTML.includes(cid)); if (targetElement) { + const rect = targetElement.getBoundingClientRect(); + if (rect.top < 0 || rect.bottom > window.innerHeight) { targetElement.scrollIntoView({ behavior: "instant" }); + } } } + function handleTouch(event) { + event.preventDefault(); + event.target.click(); + } + const handleStyleChange = (event) => { switch (event.target.value) { @@ -379,17 +387,17 @@ const Board = ({ setBodyStyle }) => { {defaultSubplebbits.map(subplebbit => ( [ - handleClickTitle(subplebbit.title, subplebbit.address)} + handleClickTitle(subplebbit.title, subplebbit.address)} >{subplebbit.title} ] ))} [ - Settings + Settings ] [ - handleStyleChange({target: {value: "Yotsuba"}} + handleStyleChange({target: {value: "Yotsuba"}} )}>Home ] @@ -405,9 +413,9 @@ const Board = ({ setBodyStyle }) => {
@@ -575,22 +586,22 @@ const Board = ({ setBodyStyle }) => {
{getDate(thread.timestamp)}
- c/
- {thread.cid.slice(0, 8)}
+ c/
+ {thread.cid.slice(0, 8)}
[
- handleClickThread(thread.cid)} className="reply-link" >Reply
+ handleClickThread(thread.cid)} className="reply-link" >Reply
]
- ▶
+ ▶
- + {`c/${reply.parentCid.slice(0, 8)}`}{
} {reply.content.slice(0, 1000)} (...)
Comment too long. - handleClickThread(thread.cid)} className="ttl-link">Click here + handleClickThread(thread.cid)} className="ttl-link">Click here to view.
- handleQuoteClick(reply, event)}> + handleQuoteClick(reply, event)}> {`c/${reply.parentCid.slice(0, 8)}`}{
} {reply.content} @@ -724,7 +735,7 @@ const Board = ({ setBodyStyle }) => {{reply.content ? ( reply.content.length > 1000 ?{renderedComments.map(reply => { @@ -855,27 +866,27 @@ const Board = ({ setBodyStyle }) => { {getDate(reply.timestamp)} - c/ - {reply.cid.slice(0, 8)} + c/ + {reply.cid.slice(0, 8)}- ... + ... {thread.author.displayName ? thread.author.displayName.length > 15 @@ -779,12 +790,12 @@ const Board = ({ setBodyStyle }) => { {getDate(thread.timestamp)} - c/ - {thread.cid.slice(0, 8)} + c/ + {thread.cid.slice(0, 8)}- +
58 KB JPG@@ -797,7 +808,7 @@ const Board = ({ setBodyStyle }) => { (...)
Post too long. - handleClickThread(thread.cid)} className="ttl-link">Click here + handleClickThread(thread.cid)} className="ttl-link">Click here to view. @@ -808,7 +819,7 @@ const Board = ({ setBodyStyle }) => {{thread.replyCount} Replies / ? Images - handleClickThread(thread.cid)} className="button-mobile" >View Thread + handleClickThread(thread.cid)} className="button-mobile" >View Thread: - + {`c/${reply.parentCid.slice(0, 8)}`}{
} {reply.content.slice(0, 1000)} (...)
Comment too long. - handleClickThread(thread.cid)} className="ttl-link">Click here + handleClickThread(thread.cid)} className="ttl-link">Click here to view.- handleQuoteClick(reply, event)}> + handleQuoteClick(reply, event)}> {`c/${reply.parentCid.slice(0, 8)}`}{
} {reply.content}