rel=noreferrer

This commit is contained in:
Daniel Kluge 2022-03-14 11:06:13 +01:00
parent 71a053662c
commit 1cad1235f2
2 changed files with 8 additions and 7 deletions

View File

@ -36,9 +36,10 @@ const REPLHistory: NextPage<REPLHistoryParams> = ({history, inputRef}) => {
while (idxStart !== -1 && idxSep !== -1 && idxEnd !== -1) { while (idxStart !== -1 && idxSep !== -1 && idxEnd !== -1) {
const linkText = line.substring(idxStart+2, idxSep); const linkText = line.substring(idxStart+2, idxSep);
const linkHref = line.substring(idxSep+1, idxEnd); const linkHref = line.substring(idxSep+1, idxEnd);
const isLocal = linkHref.startsWith("https://c0ntroller.de") || linkHref.startsWith("/");
result.push(line.substring(0, idxStart)); result.push(line.substring(0, idxStart));
result.push(<Link href={linkHref}><a className={styles.link} target={linkHref.startsWith("https://c0ntroller.de") || linkHref.startsWith("/") ? "_self" : "_blank"}>{linkText}</a></Link>); result.push(<Link href={linkHref}><a className={styles.link} target={isLocal ? "_self" : "_blank"} rel={isLocal ? "" : "noreferrer"}>{linkText}</a></Link>);
line = line.substring(idxEnd+1); line = line.substring(idxEnd+1);
idxStart = line.indexOf("#{"); idxStart = line.indexOf("#{");

View File

@ -28,17 +28,17 @@ const Home: NextPage = () => {
<div className={styles.container}> <div className={styles.container}>
<div className={styles.header}> <div className={styles.header}>
<span className={styles.spacer} onClick={focusInput}>&nbsp;</span> <span className={styles.spacer} onClick={focusInput}>&nbsp;</span>
<a href="https://github.com/C0ntroller/c0ntroller.de" target="_blank">Source</a> <a href="https://github.com/C0ntroller/c0ntroller.de" target="_blank" rel="noreferrer">Source</a>
<span className={styles.divider}>|</span> <span className={styles.divider}>|</span>
<a href="https://github.com/C0ntroller/c0ntroller.de/issues/new" target="_blank">Bug?</a> <a href="https://github.com/C0ntroller/c0ntroller.de/issues/new" target="_blank" rel="noreferrer">Bug?</a>
<span className={styles.divider}>|</span> <span className={styles.divider}>|</span>
<a href="https://github.com/C0ntroller" target="_blank"><GithubLogo color="var(--repl-color)" className={styles.iconLink} /></a> <a href="https://github.com/C0ntroller" target="_blank" rel="noreferrer"><GithubLogo color="var(--repl-color)" className={styles.iconLink} /></a>
<span className={styles.divider}>|</span> <span className={styles.divider}>|</span>
<a href="https://www.instagram.com/c0ntroller/" target="_blank"><InstagramLogo color="var(--repl-color)" className={styles.iconLink} /></a> <a href="https://www.instagram.com/c0ntroller/" target="_blank" rel="noreferrer"><InstagramLogo color="var(--repl-color)" className={styles.iconLink} /></a>
<span className={styles.divider}>|</span> <span className={styles.divider}>|</span>
<a href="https://steamcommunity.com/id/c0ntroller/" target="_blank"><GameController color="var(--repl-color)" className={styles.iconLink} /></a> <a href="https://steamcommunity.com/id/c0ntroller/" target="_blank" rel="noreferrer"><GameController color="var(--repl-color)" className={styles.iconLink} /></a>
<span className={styles.divider}>|</span> <span className={styles.divider}>|</span>
<a href="https://discordapp.com/users/224208617820127233" target="_blank"> <a href="https://discordapp.com/users/224208617820127233" target="_blank" rel="noreferrer">
<span className={styles.tooltip} style={{ cursor: "pointer" }}> <span className={styles.tooltip} style={{ cursor: "pointer" }}>
<DiscordLogo color="var(--repl-color)" className={styles.iconLink} /> <DiscordLogo color="var(--repl-color)" className={styles.iconLink} />
<span className={styles.tooltiptext}> <span className={styles.tooltiptext}>