raise nofollow limits

This commit is contained in:
keyan 2023-10-06 15:54:46 -05:00
parent 6d370aa019
commit b995b7dd3b
3 changed files with 4 additions and 4 deletions

View File

@ -112,7 +112,8 @@ export default function ZoomableImage ({ src, srcSet, ...props }) {
fullScreen: true, fullScreen: true,
overflow: ( overflow: (
<Dropdown.Item <Dropdown.Item
href={originalUrl} target='_blank' rel='noreferrer' href={originalUrl} target='_blank'
rel={`noreferrer ${props.nofollow ? 'nofollow' : ''} noopener`}
> >
open original open original
</Dropdown.Item>) </Dropdown.Item>)

View File

@ -74,10 +74,9 @@ export default function Item ({ item, rank, belowTitle, right, full, children, s
</Link> </Link>
{item.url && !image && {item.url && !image &&
<> <>
{/* eslint-disable-next-line */}
<a <a
className={styles.link} target='_blank' href={item.url} className={styles.link} target='_blank' href={item.url}
rel={item.sats + item.boost >= NOFOLLOW_LIMIT ? null : 'nofollow'} rel={`noreferrer ${item.sats + item.boost >= NOFOLLOW_LIMIT ? '' : 'nofollow'} noopener`}
> >
{item.url.replace(/(^https?:|^)\/\//, '')} {item.url.replace(/(^https?:|^)\/\//, '')}
</a> </a>

View File

@ -3,7 +3,7 @@
export const SUBS = ['bitcoin', 'nostr', 'tech', 'meta', 'jobs'] export const SUBS = ['bitcoin', 'nostr', 'tech', 'meta', 'jobs']
export const SUBS_NO_JOBS = SUBS.filter(s => s !== 'jobs') export const SUBS_NO_JOBS = SUBS.filter(s => s !== 'jobs')
export const NOFOLLOW_LIMIT = 100 export const NOFOLLOW_LIMIT = 1000
export const BOOST_MULT = 5000 export const BOOST_MULT = 5000
export const BOOST_MIN = BOOST_MULT * 5 export const BOOST_MIN = BOOST_MULT * 5
export const UPLOAD_SIZE_MAX = 2 * 1024 * 1024 export const UPLOAD_SIZE_MAX = 2 * 1024 * 1024