From 5df5e59f80924228d662d061ac4eee3f073756e3 Mon Sep 17 00:00:00 2001 From: Tom Date: Wed, 26 Apr 2023 16:22:24 +0200 Subject: [PATCH] fix invalid href attribute --- src/components/styled/Board.styled.jsx | 24 +++++------ src/components/styled/Thread.styled.jsx | 48 ++++++++++----------- src/components/views/Thread.jsx | 55 ++++++++++++------------- 3 files changed, 63 insertions(+), 64 deletions(-) diff --git a/src/components/styled/Board.styled.jsx b/src/components/styled/Board.styled.jsx index 2a52a05b..7a74ce65 100644 --- a/src/components/styled/Board.styled.jsx +++ b/src/components/styled/Board.styled.jsx @@ -1922,12 +1922,12 @@ export const BoardForm = styled.div` font-weight: 700; } - .post-number a { + .post-number { text-decoration: none; color: maroon; } - .post-number a:hover { + .post-number { color: red; } @@ -2092,12 +2092,12 @@ export const BoardForm = styled.div` font-weight: 700; } - .post-number a { + .post-number { text-decoration: none; color: #000; } - .post-number a:hover { + .post-number { color: #d00; } @@ -2261,12 +2261,12 @@ export const BoardForm = styled.div` font-weight: 700; } - .post-number a { + .post-number { text-decoration: none; color: maroon; } - .post-number a:hover { + .post-number { color: red; } @@ -2428,12 +2428,12 @@ export const BoardForm = styled.div` font-weight: 700; } - .post-number a { + .post-number { text-decoration: none; color: #000; } - .post-number a:hover { + .post-number { color: red; } @@ -2592,12 +2592,12 @@ export const BoardForm = styled.div` font-weight: 700; } - .post-number a { + .post-number { text-decoration: none; color: #c5c8c6; } - .post-number a:hover { + .post-number { color: #5f89ab; } @@ -2766,12 +2766,12 @@ export const BoardForm = styled.div` font-weight: 700; } - .post-number a { + .post-number { text-decoration: none; color: #333; } - .post-number a:hover { + .post-number { color: #ff3300; } diff --git a/src/components/styled/Thread.styled.jsx b/src/components/styled/Thread.styled.jsx index 60e04acb..5d24ac0b 100644 --- a/src/components/styled/Thread.styled.jsx +++ b/src/components/styled/Thread.styled.jsx @@ -234,12 +234,12 @@ export const TopBar = styled.div` .return-button { margin-left: 10px; - a, a:visited { + a, a:visited, #button { color: #00e !important; text-decoration: none; } - a:hover { + a:hover, #button:hover { color: red !important; } }`; @@ -260,12 +260,12 @@ export const TopBar = styled.div` .return-button { margin-left: 10px; - a, a:visited { + a, a:visited, #button { color: #34345c !important; text-decoration: none; } - a:hover { + a:hover, #button:hover { color: red !important; } }`; @@ -286,12 +286,12 @@ export const TopBar = styled.div` padding-top: 2px; font-size: 12pt; - a, a:visited { + a, a:visited, #button { color: #00e !important; text-decoration: underline; } - a:hover { + a:hover, #button:hover { color: red !important; } } @@ -317,12 +317,12 @@ export const TopBar = styled.div` padding-top: 2px; font-size: 12pt; - a, a:visited { + a, a:visited, #button { color: #34345c !important; text-decoration: underline; } - a:hover { + a:hover, #button:hover { color: red !important; } } @@ -354,12 +354,12 @@ export const TopBar = styled.div` .return-button { margin-left: 10px; - a, a:visited { + a, a:visited, #button { color: #81a2be !important; text-decoration: none; } - a:hover { + a:hover, #button:hover { color: #5f89ab !important; } }`; @@ -380,12 +380,12 @@ export const TopBar = styled.div` .return-button { margin-left: 10px; - a, a:visited { + a, a:visited, #button { color: #f60 !important; text-decoration: none; } - a:hover { + a:hover, #button:hover { color: #ff3300 !important; } }`; @@ -563,12 +563,12 @@ export const BottomBar = styled.div` switch (selectedStyle) { case 'Yotsuba': return ` - a, a:visited { + a, a:visited, #button { color: #00e !important; text-decoration: none; } - a:hover { + a:hover, #button:hover { color: red !important; } @@ -581,12 +581,12 @@ export const BottomBar = styled.div` case 'Yotsuba-B': return ` - a, a:visited { + a, a:visited, #button { color: #34345c !important; text-decoration: none; } - a:hover { + a:hover, #button:hover { color: red !important; } @@ -599,12 +599,12 @@ export const BottomBar = styled.div` case 'Futaba': return ` - a, a:visited { + a, a:visited, #button { color: #00e !important; text-decoration: underline; } - a:hover { + a:hover, #button:hover { color: red !important; } @@ -625,12 +625,12 @@ export const BottomBar = styled.div` case 'Burichan': return ` - a, a:visited { + a, a:visited, #button { color: #34345c !important; text-decoration: underline; } - a:hover { + a:hover, #button:hover { color: red !important; } @@ -651,12 +651,12 @@ export const BottomBar = styled.div` case 'Tomorrow': return ` - a, a:visited { + a, a:visited, #button { color: #81a2be !important; text-decoration: none; } - a:hover { + a:hover, #button:hover { color: #5f89ab !important; } @@ -669,12 +669,12 @@ export const BottomBar = styled.div` case 'Photon': return ` - a, a:visited { + a, a:visited, #button { color: #f60 !important; text-decoration: none; } - a:hover { + a:hover, #button:hover { color: #ff3300 !important; } diff --git a/src/components/views/Thread.jsx b/src/components/views/Thread.jsx index 16068b2a..a33297e7 100644 --- a/src/components/views/Thread.jsx +++ b/src/components/views/Thread.jsx @@ -344,7 +344,7 @@ const Thread = () => {
- {}} onClick={() => window.scrollTo(0, document.body.scrollHeight)} onMouseOver={(event) => event.target.style.cursor='pointer'}>Bottom + window.scrollTo(0, document.body.scrollHeight)} onMouseOver={(event) => event.target.style.cursor='pointer'}>Bottom
@@ -413,9 +413,9 @@ const Thread = () => { [ - {}} onClick={() => window.scrollTo(0, document.body.scrollHeight)} + window.scrollTo(0, document.body.scrollHeight)} onMouseOver={(event) => event.target.style.cursor='pointer'} - onTouchStart={() => window.scrollTo(0, document.body.scrollHeight)}>Bottom + onTouchStart={() => window.scrollTo(0, document.body.scrollHeight)}>Bottom ] {comment ? ( @@ -522,21 +522,21 @@ const Thread = () => { {getDate(comment?.timestamp)}   - {}} title="Link to this post">c/ + c/    - + ) : null}
- {}} className="quote-link" + { handleQuoteClick(reply, shortParentCid, comment.shortCid, event); }} > {`c/${shortParentCid}`}{shortParentCid === comment.shortCid ? " (OP)" : null} - +
@@ -697,7 +697,7 @@ const Thread = () => {
- + {comment.author?.displayName ? comment.author?.displayName.length > 15 @@ -745,7 +745,7 @@ const Thread = () => { - {}} key={`mob-no2-${comment.cid}`} title="Reply to this post">{comment.shortCid} + {comment.shortCid}
{commentMediaInfo?.url ? ( @@ -839,7 +839,7 @@ const Thread = () => { {getDate(reply?.timestamp)}  - {}} key={`mob-pl1-${index}`} title="Link to this post">c/ + c/ {reply.shortCid ? (
) : null}
- {}} key={`mob-ql-${index}`} className="quotelink-mobile" + handleQuoteClick(reply, shortParentCid, comment.shortCid, event)}> {`c/${shortParentCid}`}{shortParentCid === comment.shortCid ? " (OP)" : null} - +
{reply.replyCount > 0 ? ( @@ -895,10 +895,9 @@ const Thread = () => { .sort((a, b) => a.timestamp - b.timestamp) .map((reply, index) => (
- {}} className="quote-link" + handleQuoteClick(reply, reply.shortCid, event)}> - c/{reply.shortCid} + c/{reply.shortCid}  
))} @@ -925,14 +924,14 @@ const Thread = () => { [ - {}} onClick={() => window.scrollTo(0, 0)} + window.scrollTo(0, 0)} onMouseOver={(event) => event.target.style.cursor='pointer'} - onTouchStart={() => window.scrollTo(0, 0)}>Top + onTouchStart={() => window.scrollTo(0, 0)}>Top ] [ - {}} onClick={() => {setIsReplyOpen(true); setSelectedParentCid(comment.cid); setSelectedShortCid(comment.shortCid);}} onMouseOver={(event) => event.target.style.cursor='pointer'}>Post a Reply + {setIsReplyOpen(true); setSelectedParentCid(comment.cid); setSelectedShortCid(comment.shortCid);}} onMouseOver={(event) => event.target.style.cursor='pointer'}>Post a Reply ] {comment.replyCount > 0 ? ( @@ -981,7 +980,7 @@ const Thread = () => {
- {}} onClick={() => {setIsReplyOpen(true); setSelectedParentCid(comment.cid); setSelectedShortCid(comment.shortCid);}} onMouseOver={(event) => event.target.style.cursor='pointer'}>Post a Reply + {setIsReplyOpen(true); setSelectedParentCid(comment.cid); setSelectedShortCid(comment.shortCid);}} onMouseOver={(event) => event.target.style.cursor='pointer'}>Post a Reply
@@ -997,11 +996,11 @@ const Thread = () => {
- {}} onClick={() => window.scrollTo(0, 0)} + window.scrollTo(0, 0)} onMouseOver={(event) => event.target.style.cursor='pointer'} onTouchStart={() => window.scrollTo(0, 0)} - style={{marginRight: "10px", marginLeft: "10px"}} - >Top + style={{cursor: 'pointer', marginRight: "10px", marginLeft: "10px"}} + >Top