Allow configure referrer policy

This commit is contained in:
Lim Chee Aun 2025-01-23 21:17:58 +08:00
parent 2b05784a37
commit 7aa677e6e2
12 changed files with 180 additions and 180 deletions

View file

@ -233,6 +233,11 @@ Available variables:
- `PHANPY_DEFAULT_LANG` (optional):
- Default language is English (`en`) if not specified.
- Fallback language after multiple detection methods (`lang` query parameter, `lang` key in `localStorage` and `navigator.language`)
- `PHANPY_REFERRER_POLICY` (optional, default: `origin`):
- Referrer policy for the site. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy).
- This is applied with the `<meta>` tag on the client-side.
- The policy can also be set with `Referrer-Policy` header configured on the server-side (not this variable).
- Note that since Phanpy uses hash-based URLs, the referrer does not include the hash part.
- `PHANPY_LINGVA_INSTANCES` (optional, space-separated list, default: `lingva.phanpy.social [...hard-coded list of fallback instances]`):
- Specify a space-separated list of instances. First will be used as default before falling back to the subsequent instances. If there's only 1 instance, means no fallback.
- May specify a self-hosted Lingva instance, powered by either [lingva-translate](https://github.com/thedaviddelta/lingva-translate) or [lingva-api](https://github.com/cheeaun/lingva-api)

View file

@ -379,11 +379,7 @@ function AccountInfo({
<Trans>Unable to load account.</Trans>
</p>
<p>
<a
href={isString ? account : url}
target="_blank"
rel="noopener noreferrer"
>
<a href={isString ? account : url} target="_blank" rel="noopener">
<Trans>Go to account page</Trans> <Icon icon="external" />
</a>
</p>

View file

@ -13,12 +13,7 @@ function EmbedModal({ html, url, width, height, onClose = () => {} }) {
<Icon icon="x" alt={t`Close`} />
</button>
{url && (
<a
href={url}
target="_blank"
rel="noopener noreferrer"
class="button plain"
>
<a href={url} target="_blank" rel="noopener" class="button plain">
<span>
<Trans>Open in new window</Trans>
</span>{' '}

View file

@ -510,7 +510,7 @@ function Notification({
<a
href={`https://${instance}/severed_relationships`}
target="_blank"
rel="noopener noreferrer"
rel="noopener"
>
<Trans>
Learn more <Icon icon="external" size="s" />
@ -526,7 +526,7 @@ function Notification({
<a
href={`/disputes/strikes/${moderation_warning.id}`}
target="_blank"
rel="noopener noreferrer"
rel="noopener"
>
<Trans>
Learn more <Icon icon="external" size="s" />
@ -550,7 +550,7 @@ function Notification({
<a
key={account.id}
href={account.url}
rel="noopener noreferrer"
rel="noopener"
class="account-avatar-stack"
onClick={(e) => {
e.preventDefault();
@ -654,7 +654,7 @@ function Notification({
<a
key={account.id}
href={account.url}
rel="noopener noreferrer"
rel="noopener"
class="account-avatar-stack"
onClick={(e) => {
e.preventDefault();

View file

@ -2282,7 +2282,7 @@ function Status({
alt={visibilityText[visibility]}
/> */}
<span>{_(visibilityText[visibility])}</span> &bull;{' '}
<a href={url} target="_blank" rel="noopener noreferrer">
<a href={url} target="_blank" rel="noopener">
{
// within a day
new Date().getTime() - createdAtDate.getTime() <
@ -2820,7 +2820,7 @@ function Card({ card, selfReferential, selfAuthor, instance }) {
<a
href={cardStatusURL || url}
target={cardStatusURL ? null : '_blank'}
rel="nofollow noopener noreferrer"
rel="nofollow noopener"
class={`card link ${isPost ? 'card-post' : ''} ${
blurhashImage ? '' : size
}`}
@ -2883,7 +2883,7 @@ function Card({ card, selfReferential, selfAuthor, instance }) {
<a
href={url}
target="_blank"
rel="nofollow noopener noreferrer"
rel="nofollow noopener"
class="card photo"
onClick={handleClick}
>
@ -2930,7 +2930,7 @@ function Card({ card, selfReferential, selfAuthor, instance }) {
<a
href={cardStatusURL || url}
target={cardStatusURL ? null : '_blank'}
rel="nofollow noopener noreferrer"
rel="nofollow noopener"
class={`card link ${isPost ? 'card-post' : ''} no-image`}
lang={language}
dir="auto"

274
src/locales/en.po generated
View file

@ -28,12 +28,12 @@ msgid "Last posted: {0}"
msgstr ""
#: src/components/account-block.jsx:162
#: src/components/account-info.jsx:636
#: src/components/account-info.jsx:632
msgid "Automated"
msgstr ""
#: src/components/account-block.jsx:169
#: src/components/account-info.jsx:641
#: src/components/account-info.jsx:637
#: src/components/status.jsx:514
msgid "Group"
msgstr ""
@ -43,17 +43,17 @@ msgid "Mutual"
msgstr ""
#: src/components/account-block.jsx:183
#: src/components/account-info.jsx:1682
#: src/components/account-info.jsx:1678
msgid "Requested"
msgstr ""
#: src/components/account-block.jsx:187
#: src/components/account-info.jsx:1673
#: src/components/account-info.jsx:1669
msgid "Following"
msgstr ""
#: src/components/account-block.jsx:191
#: src/components/account-info.jsx:1064
#: src/components/account-info.jsx:1060
msgid "Follows you"
msgstr ""
@ -62,14 +62,14 @@ msgid "{followersCount, plural, one {# follower} other {# followers}}"
msgstr ""
#: src/components/account-block.jsx:208
#: src/components/account-info.jsx:682
#: src/components/account-info.jsx:678
msgid "Verified"
msgstr ""
#. placeholder {0}: niceDateTime(createdAt, { hideTime: true, })
#. placeholder {0}: niceDateTime(createdAt, { hideTime: true, })
#: src/components/account-block.jsx:223
#: src/components/account-info.jsx:782
#: src/components/account-info.jsx:778
msgid "Joined <0>{0}</0>"
msgstr ""
@ -81,33 +81,33 @@ msgstr ""
msgid "Unable to load account."
msgstr ""
#: src/components/account-info.jsx:387
#: src/components/account-info.jsx:383
msgid "Go to account page"
msgstr ""
#: src/components/account-info.jsx:415
#: src/components/account-info.jsx:704
#: src/components/account-info.jsx:734
#: src/components/account-info.jsx:411
#: src/components/account-info.jsx:700
#: src/components/account-info.jsx:730
msgid "Followers"
msgstr ""
#. js-lingui-explicit-id
#: src/components/account-info.jsx:418
#: src/components/account-info.jsx:744
#: src/components/account-info.jsx:761
#: src/components/account-info.jsx:414
#: src/components/account-info.jsx:740
#: src/components/account-info.jsx:757
msgid "following.stats"
msgstr "Following"
#: src/components/account-info.jsx:421
#: src/components/account-info.jsx:778
#: src/components/account-info.jsx:417
#: src/components/account-info.jsx:774
#: src/pages/account-statuses.jsx:483
#: src/pages/search.jsx:328
#: src/pages/search.jsx:475
msgid "Posts"
msgstr ""
#: src/components/account-info.jsx:429
#: src/components/account-info.jsx:1120
#: src/components/account-info.jsx:425
#: src/components/account-info.jsx:1116
#: src/components/compose.jsx:2624
#: src/components/media-alt-modal.jsx:46
#: src/components/media-modal.jsx:358
@ -126,50 +126,50 @@ msgstr ""
msgid "More"
msgstr ""
#: src/components/account-info.jsx:441
#: src/components/account-info.jsx:437
msgid "<0>{displayName}</0> has indicated that their new account is now:"
msgstr ""
#: src/components/account-info.jsx:586
#: src/components/account-info.jsx:1278
#: src/components/account-info.jsx:582
#: src/components/account-info.jsx:1274
msgid "Handle copied"
msgstr "Handle copied"
#: src/components/account-info.jsx:589
#: src/components/account-info.jsx:1281
#: src/components/account-info.jsx:585
#: src/components/account-info.jsx:1277
msgid "Unable to copy handle"
msgstr "Unable to copy handle"
#: src/components/account-info.jsx:595
#: src/components/account-info.jsx:1287
#: src/components/account-info.jsx:591
#: src/components/account-info.jsx:1283
msgid "Copy handle"
msgstr ""
#: src/components/account-info.jsx:601
#: src/components/account-info.jsx:597
msgid "Go to original profile page"
msgstr ""
#: src/components/account-info.jsx:608
#: src/components/account-info.jsx:604
msgid "View profile image"
msgstr ""
#: src/components/account-info.jsx:614
#: src/components/account-info.jsx:610
msgid "View profile header"
msgstr ""
#: src/components/account-info.jsx:631
#: src/components/account-info.jsx:627
msgid "In Memoriam"
msgstr ""
#: src/components/account-info.jsx:711
#: src/components/account-info.jsx:752
#: src/components/account-info.jsx:707
#: src/components/account-info.jsx:748
msgid "This user has chosen to not make this information available."
msgstr "This user has chosen to not make this information available."
#. placeholder {0}: ( postingStats.originals / postingStats.total ).toLocaleString(i18n.locale || undefined, { style: 'percent', })
#. placeholder {1}: ( postingStats.replies / postingStats.total ).toLocaleString(i18n.locale || undefined, { style: 'percent', })
#. placeholder {2}: ( postingStats.boosts / postingStats.total ).toLocaleString(i18n.locale || undefined, { style: 'percent', })
#: src/components/account-info.jsx:807
#: src/components/account-info.jsx:803
msgid "{0} original posts, {1} replies, {2} boosts"
msgstr "{0} original posts, {1} replies, {2} boosts"
@ -180,22 +180,22 @@ msgstr "{0} original posts, {1} replies, {2} boosts"
#. placeholder {4}: postingStats.total
#. placeholder {5}: postingStats.total
#. placeholder {6}: postingStats.daysSinceLastPost
#: src/components/account-info.jsx:823
#: src/components/account-info.jsx:819
msgid "{0, plural, one {{1, plural, one {Last 1 post in the past 1 day} other {Last 1 post in the past {2} days}}} other {{3, plural, one {Last {4} posts in the past 1 day} other {Last {5} posts in the past {6} days}}}}"
msgstr ""
#. placeholder {0}: postingStats.total
#. placeholder {1}: postingStats.total
#: src/components/account-info.jsx:836
#: src/components/account-info.jsx:832
msgid "{0, plural, one {Last 1 post in the past year(s)} other {Last {1} posts in the past year(s)}}"
msgstr ""
#: src/components/account-info.jsx:860
#: src/components/account-info.jsx:856
#: src/pages/catchup.jsx:70
msgid "Original"
msgstr ""
#: src/components/account-info.jsx:864
#: src/components/account-info.jsx:860
#: src/components/status.jsx:2268
#: src/pages/catchup.jsx:71
#: src/pages/catchup.jsx:1445
@ -205,218 +205,218 @@ msgstr ""
msgid "Replies"
msgstr ""
#: src/components/account-info.jsx:868
#: src/components/account-info.jsx:864
#: src/pages/catchup.jsx:72
#: src/pages/catchup.jsx:1447
#: src/pages/catchup.jsx:2070
#: src/pages/settings.jsx:1155
#: src/pages/settings.jsx:1151
msgid "Boosts"
msgstr ""
#: src/components/account-info.jsx:874
#: src/components/account-info.jsx:870
msgid "Post stats unavailable."
msgstr ""
#: src/components/account-info.jsx:905
#: src/components/account-info.jsx:901
msgid "View post stats"
msgstr ""
#. placeholder {0}: niceDateTime(lastStatusAt, { hideTime: true, })
#: src/components/account-info.jsx:1068
#: src/components/account-info.jsx:1064
msgid "Last post: <0>{0}</0>"
msgstr ""
#: src/components/account-info.jsx:1082
#: src/components/account-info.jsx:1078
msgid "Muted"
msgstr ""
#: src/components/account-info.jsx:1087
#: src/components/account-info.jsx:1083
msgid "Blocked"
msgstr ""
#: src/components/account-info.jsx:1096
#: src/components/account-info.jsx:1092
msgid "Private note"
msgstr "Private note"
#: src/components/account-info.jsx:1153
#: src/components/account-info.jsx:1149
msgid "Mention <0>@{username}</0>"
msgstr ""
#: src/components/account-info.jsx:1165
#: src/components/account-info.jsx:1161
msgid "Translate bio"
msgstr ""
#: src/components/account-info.jsx:1176
#: src/components/account-info.jsx:1172
msgid "Edit private note"
msgstr "Edit private note"
#: src/components/account-info.jsx:1176
#: src/components/account-info.jsx:1172
msgid "Add private note"
msgstr "Add private note"
#: src/components/account-info.jsx:1196
#: src/components/account-info.jsx:1192
msgid "Notifications enabled for @{username}'s posts."
msgstr "Notifications enabled for @{username}'s posts."
#: src/components/account-info.jsx:1197
#: src/components/account-info.jsx:1193
msgid " Notifications disabled for @{username}'s posts."
msgstr " Notifications disabled for @{username}'s posts."
#: src/components/account-info.jsx:1209
#: src/components/account-info.jsx:1205
msgid "Disable notifications"
msgstr "Disable notifications"
#: src/components/account-info.jsx:1210
#: src/components/account-info.jsx:1206
msgid "Enable notifications"
msgstr "Enable notifications"
#: src/components/account-info.jsx:1227
#: src/components/account-info.jsx:1223
msgid "Boosts from @{username} enabled."
msgstr "Boosts from @{username} enabled."
#: src/components/account-info.jsx:1228
#: src/components/account-info.jsx:1224
msgid "Boosts from @{username} disabled."
msgstr "Boosts from @{username} disabled."
#: src/components/account-info.jsx:1239
#: src/components/account-info.jsx:1235
msgid "Disable boosts"
msgstr "Disable boosts"
#: src/components/account-info.jsx:1239
#: src/components/account-info.jsx:1235
msgid "Enable boosts"
msgstr "Enable boosts"
#: src/components/account-info.jsx:1255
#: src/components/account-info.jsx:1265
#: src/components/account-info.jsx:1868
#: src/components/account-info.jsx:1251
#: src/components/account-info.jsx:1261
#: src/components/account-info.jsx:1864
msgid "Add/Remove from Lists"
msgstr ""
#: src/components/account-info.jsx:1304
#: src/components/account-info.jsx:1300
#: src/components/status.jsx:1177
msgid "Link copied"
msgstr ""
#: src/components/account-info.jsx:1307
#: src/components/account-info.jsx:1303
#: src/components/status.jsx:1180
msgid "Unable to copy link"
msgstr ""
#: src/components/account-info.jsx:1313
#: src/components/account-info.jsx:1309
#: src/components/shortcuts-settings.jsx:1059
#: src/components/status.jsx:1186
#: src/components/status.jsx:3269
msgid "Copy"
msgstr ""
#: src/components/account-info.jsx:1328
#: src/components/account-info.jsx:1324
#: src/components/shortcuts-settings.jsx:1077
#: src/components/status.jsx:1202
msgid "Sharing doesn't seem to work."
msgstr ""
#: src/components/account-info.jsx:1334
#: src/components/account-info.jsx:1330
#: src/components/status.jsx:1208
msgid "Share…"
msgstr ""
#: src/components/account-info.jsx:1354
#: src/components/account-info.jsx:1350
msgid "Unmuted @{username}"
msgstr "Unmuted @{username}"
#: src/components/account-info.jsx:1366
#: src/components/account-info.jsx:1362
msgid "Unmute <0>@{username}</0>"
msgstr ""
#: src/components/account-info.jsx:1382
#: src/components/account-info.jsx:1378
msgid "Mute <0>@{username}</0>…"
msgstr ""
#. placeholder {0}: typeof MUTE_DURATIONS_LABELS[duration] === 'function' ? MUTE_DURATIONS_LABELS[duration]() : _(MUTE_DURATIONS_LABELS[duration])
#: src/components/account-info.jsx:1414
#: src/components/account-info.jsx:1410
msgid "Muted @{username} for {0}"
msgstr "Muted @{username} for {0}"
#: src/components/account-info.jsx:1426
#: src/components/account-info.jsx:1422
msgid "Unable to mute @{username}"
msgstr "Unable to mute @{username}"
#: src/components/account-info.jsx:1447
#: src/components/account-info.jsx:1443
msgid "Remove <0>@{username}</0> from followers?"
msgstr ""
#: src/components/account-info.jsx:1467
#: src/components/account-info.jsx:1463
msgid "@{username} removed from followers"
msgstr "@{username} removed from followers"
#: src/components/account-info.jsx:1479
#: src/components/account-info.jsx:1475
msgid "Remove follower…"
msgstr ""
#: src/components/account-info.jsx:1490
#: src/components/account-info.jsx:1486
msgid "Block <0>@{username}</0>?"
msgstr ""
#: src/components/account-info.jsx:1514
#: src/components/account-info.jsx:1510
msgid "Unblocked @{username}"
msgstr "Unblocked @{username}"
#: src/components/account-info.jsx:1522
#: src/components/account-info.jsx:1518
msgid "Blocked @{username}"
msgstr "Blocked @{username}"
#: src/components/account-info.jsx:1530
#: src/components/account-info.jsx:1526
msgid "Unable to unblock @{username}"
msgstr "Unable to unblock @{username}"
#: src/components/account-info.jsx:1532
#: src/components/account-info.jsx:1528
msgid "Unable to block @{username}"
msgstr "Unable to block @{username}"
#: src/components/account-info.jsx:1542
#: src/components/account-info.jsx:1538
msgid "Unblock <0>@{username}</0>"
msgstr ""
#: src/components/account-info.jsx:1551
#: src/components/account-info.jsx:1547
msgid "Block <0>@{username}</0>…"
msgstr ""
#: src/components/account-info.jsx:1568
#: src/components/account-info.jsx:1564
msgid "Report <0>@{username}</0>…"
msgstr ""
#: src/components/account-info.jsx:1588
#: src/components/account-info.jsx:2103
#: src/components/account-info.jsx:1584
#: src/components/account-info.jsx:2099
msgid "Edit profile"
msgstr ""
#: src/components/account-info.jsx:1624
#: src/components/account-info.jsx:1620
msgid "Withdraw follow request?"
msgstr "Withdraw follow request?"
#. placeholder {1}: info.acct || info.username
#: src/components/account-info.jsx:1625
#: src/components/account-info.jsx:1621
msgid "Unfollow @{1}?"
msgstr "Unfollow @{1}?"
#: src/components/account-info.jsx:1676
#: src/components/account-info.jsx:1672
msgid "Unfollow…"
msgstr ""
#: src/components/account-info.jsx:1685
#: src/components/account-info.jsx:1681
msgid "Withdraw…"
msgstr ""
#: src/components/account-info.jsx:1688
#: src/components/account-info.jsx:1692
#: src/components/account-info.jsx:1696
#: src/pages/hashtag.jsx:262
msgid "Follow"
msgstr ""
#: src/components/account-info.jsx:1808
#: src/components/account-info.jsx:1863
#: src/components/account-info.jsx:1997
#: src/components/account-info.jsx:2098
#: src/components/account-info.jsx:1804
#: src/components/account-info.jsx:1859
#: src/components/account-info.jsx:1993
#: src/components/account-info.jsx:2094
#: src/components/account-sheet.jsx:38
#: src/components/compose.jsx:859
#: src/components/compose.jsx:2580
@ -448,77 +448,77 @@ msgstr ""
msgid "Close"
msgstr ""
#: src/components/account-info.jsx:1813
#: src/components/account-info.jsx:1809
msgid "Translated Bio"
msgstr ""
#: src/components/account-info.jsx:1908
#: src/components/account-info.jsx:1904
msgid "Unable to remove from list."
msgstr "Unable to remove from list."
#: src/components/account-info.jsx:1909
#: src/components/account-info.jsx:1905
msgid "Unable to add to list."
msgstr "Unable to add to list."
#: src/components/account-info.jsx:1928
#: src/components/account-info.jsx:1924
#: src/pages/lists.jsx:105
msgid "Unable to load lists."
msgstr ""
#: src/components/account-info.jsx:1932
#: src/components/account-info.jsx:1928
msgid "No lists."
msgstr ""
#: src/components/account-info.jsx:1943
#: src/components/account-info.jsx:1939
#: src/components/list-add-edit.jsx:40
#: src/pages/lists.jsx:59
msgid "New list"
msgstr ""
#. placeholder {0}: account?.username || account?.acct
#: src/components/account-info.jsx:2002
#: src/components/account-info.jsx:1998
msgid "Private note about <0>@{0}</0>"
msgstr ""
#: src/components/account-info.jsx:2032
#: src/components/account-info.jsx:2028
msgid "Unable to update private note."
msgstr "Unable to update private note."
#: src/components/account-info.jsx:2055
#: src/components/account-info.jsx:2226
#: src/components/account-info.jsx:2051
#: src/components/account-info.jsx:2222
msgid "Cancel"
msgstr ""
#: src/components/account-info.jsx:2060
#: src/components/account-info.jsx:2056
msgid "Save & close"
msgstr ""
#: src/components/account-info.jsx:2154
#: src/components/account-info.jsx:2150
msgid "Unable to update profile."
msgstr "Unable to update profile."
#: src/components/account-info.jsx:2161
#: src/components/account-info.jsx:2157
#: src/components/list-add-edit.jsx:105
msgid "Name"
msgstr ""
#: src/components/account-info.jsx:2174
#: src/components/account-info.jsx:2170
msgid "Bio"
msgstr ""
#: src/components/account-info.jsx:2187
#: src/components/account-info.jsx:2183
msgid "Extra fields"
msgstr ""
#: src/components/account-info.jsx:2193
#: src/components/account-info.jsx:2189
msgid "Label"
msgstr ""
#: src/components/account-info.jsx:2196
#: src/components/account-info.jsx:2192
msgid "Content"
msgstr ""
#: src/components/account-info.jsx:2229
#: src/components/account-info.jsx:2225
#: src/components/list-add-edit.jsx:150
#: src/components/shortcuts-settings.jsx:715
#: src/pages/filters.jsx:554
@ -526,11 +526,11 @@ msgstr ""
msgid "Save"
msgstr ""
#: src/components/account-info.jsx:2283
#: src/components/account-info.jsx:2279
msgid "username"
msgstr ""
#: src/components/account-info.jsx:2287
#: src/components/account-info.jsx:2283
msgid "server domain name"
msgstr ""
@ -984,7 +984,7 @@ msgstr ""
msgid "Media"
msgstr ""
#: src/components/embed-modal.jsx:23
#: src/components/embed-modal.jsx:18
msgid "Open in new window"
msgstr ""
@ -1327,7 +1327,7 @@ msgstr ""
#: src/pages/home.jsx:225
#: src/pages/mentions.jsx:21
#: src/pages/mentions.jsx:168
#: src/pages/settings.jsx:1147
#: src/pages/settings.jsx:1143
#: src/pages/trending.jsx:382
msgid "Mentions"
msgstr ""
@ -1366,7 +1366,7 @@ msgstr ""
#: src/pages/catchup.jsx:2064
#: src/pages/favourites.jsx:12
#: src/pages/favourites.jsx:24
#: src/pages/settings.jsx:1151
#: src/pages/settings.jsx:1147
msgid "Likes"
msgstr ""
@ -2417,7 +2417,7 @@ msgid "<0/> <1/> boosted"
msgstr ""
#: src/components/timeline.jsx:455
#: src/pages/settings.jsx:1175
#: src/pages/settings.jsx:1171
msgid "New posts"
msgstr ""
@ -3291,7 +3291,7 @@ msgid "{0, plural, one {Announcement} other {Announcements}}"
msgstr ""
#: src/pages/notifications.jsx:654
#: src/pages/settings.jsx:1163
#: src/pages/settings.jsx:1159
msgid "Follow requests"
msgstr ""
@ -3634,79 +3634,79 @@ msgstr ""
msgid "Donate"
msgstr "Donate"
#: src/pages/settings.jsx:793
#: src/pages/settings.jsx:789
msgid "Privacy Policy"
msgstr ""
#. placeholder {0}: WEBSITE.replace(/https?:\/\//g, '').replace(/\/$/, '')
#: src/pages/settings.jsx:800
#: src/pages/settings.jsx:796
msgid "<0>Site:</0> {0}"
msgstr ""
#. placeholder {0}: !__FAKE_COMMIT_HASH__ && ( <span class="ib insignificant"> ( <a href={`https://github.com/cheeaun/phanpy/commit/${__COMMIT_HASH__}`} target="_blank" rel="noopener noreferrer" > <RelativeTime datetime={new Date(__BUILD_TIME__)} /> </a> ) </span> )
#: src/pages/settings.jsx:807
#. placeholder {0}: !__FAKE_COMMIT_HASH__ && ( <span class="ib insignificant"> ( <a href={`https://github.com/cheeaun/phanpy/commit/${__COMMIT_HASH__}`} target="_blank" rel="noopener" > <RelativeTime datetime={new Date(__BUILD_TIME__)} /> </a> ) </span> )
#: src/pages/settings.jsx:803
msgid "<0>Version:</0> <1/> {0}"
msgstr ""
#: src/pages/settings.jsx:822
#: src/pages/settings.jsx:818
msgid "Version string copied"
msgstr ""
#: src/pages/settings.jsx:825
#: src/pages/settings.jsx:821
msgid "Unable to copy version string"
msgstr ""
#: src/pages/settings.jsx:1060
#: src/pages/settings.jsx:1065
#: src/pages/settings.jsx:1056
#: src/pages/settings.jsx:1061
msgid "Failed to update subscription. Please try again."
msgstr ""
#: src/pages/settings.jsx:1071
#: src/pages/settings.jsx:1067
msgid "Failed to remove subscription. Please try again."
msgstr ""
#: src/pages/settings.jsx:1078
#: src/pages/settings.jsx:1074
msgid "Push Notifications (beta)"
msgstr ""
#: src/pages/settings.jsx:1100
#: src/pages/settings.jsx:1096
msgid "Push notifications are blocked. Please enable them in your browser settings."
msgstr ""
#. placeholder {0}: [ { value: 'all', label: t`anyone`, }, { value: 'followed', label: t`people I follow`, }, { value: 'follower', label: t`followers`, }, ].map((type) => ( <option value={type.value}>{type.label}</option> ))
#: src/pages/settings.jsx:1109
#: src/pages/settings.jsx:1105
msgid "Allow from <0>{0}</0>"
msgstr ""
#: src/pages/settings.jsx:1118
#: src/pages/settings.jsx:1114
msgid "anyone"
msgstr ""
#: src/pages/settings.jsx:1122
#: src/pages/settings.jsx:1118
msgid "people I follow"
msgstr ""
#: src/pages/settings.jsx:1126
#: src/pages/settings.jsx:1122
msgid "followers"
msgstr ""
#: src/pages/settings.jsx:1159
#: src/pages/settings.jsx:1155
msgid "Follows"
msgstr ""
#: src/pages/settings.jsx:1167
#: src/pages/settings.jsx:1163
msgid "Polls"
msgstr ""
#: src/pages/settings.jsx:1171
#: src/pages/settings.jsx:1167
msgid "Post edits"
msgstr ""
#: src/pages/settings.jsx:1192
#: src/pages/settings.jsx:1188
msgid "Push permission was not granted since your last login. You'll need to <0><1>log in</1> again to grant push permission</0>."
msgstr ""
#: src/pages/settings.jsx:1208
#: src/pages/settings.jsx:1204
msgid "NOTE: Push notifications only work for <0>one account</0>."
msgstr ""
@ -3807,7 +3807,7 @@ msgid "Trending News"
msgstr ""
#. By [Author]
#. placeholder {0}: author ? ( <NameText account={author} showAvatar /> ) : authorUrl ? ( <a href={authorUrl} target="_blank" rel="noopener noreferrer" > {authorName} </a> ) : ( authorName )
#. placeholder {0}: author ? ( <NameText account={author} showAvatar /> ) : authorUrl ? ( <a href={authorUrl} target="_blank" rel="noopener" > {authorName} </a> ) : ( authorName )
#: src/pages/trending.jsx:348
msgid "By {0}"
msgstr "By {0}"

View file

@ -1192,7 +1192,7 @@ function Catchup() {
key={url}
href={url}
target="_blank"
rel="noopener noreferrer"
rel="noopener"
class="link-block"
style={
accentColor

View file

@ -68,7 +68,7 @@ export default function HttpRoute() {
<Trans>Resolving</Trans>
</h2>
<p>
<a href={url} target="_blank" rel="noopener noreferrer">
<a href={url} target="_blank" rel="noopener">
{url}
</a>
</p>
@ -79,7 +79,7 @@ export default function HttpRoute() {
<Trans>Unable to resolve URL</Trans>
</h2>
<p>
<a href={url} target="_blank" rel="noopener noreferrer">
<a href={url} target="_blank" rel="noopener">
{url}
</a>
</p>

View file

@ -250,7 +250,7 @@ function Settings({ onClose }) {
<a
href="https://crowdin.com/project/phanpy"
target="_blank"
rel="noopener noreferrer"
rel="noopener"
>
<Trans>Volunteer translations</Trans>
</a>
@ -324,7 +324,7 @@ function Settings({ onClose }) {
<a
href={`https://${instance}/`}
target="_blank"
rel="noopener noreferrer"
rel="noopener"
>
Go to your instance ({instance}) for more settings.
</a>
@ -483,7 +483,7 @@ function Settings({ onClose }) {
<a
href="https://github.com/cheeaun/lingva-api"
target="_blank"
rel="noopener noreferrer"
rel="noopener"
>
Lingva API
</a>{' '}
@ -491,7 +491,7 @@ function Settings({ onClose }) {
<a
href="https://github.com/thedaviddelta/lingva-translate"
target="_blank"
rel="noopener noreferrer"
rel="noopener"
>
Lingva Translate
</a>
@ -545,7 +545,7 @@ function Settings({ onClose }) {
<a
href="https://developers.giphy.com/"
target="_blank"
rel="noopener noreferrer"
rel="noopener"
>
GIPHY
</a>
@ -585,7 +585,7 @@ function Settings({ onClose }) {
<a
href="https://github.com/cheeaun/img-alt-api"
target="_blank"
rel="noopener noreferrer"
rel="noopener"
>
img-alt-api
</a>
@ -728,7 +728,7 @@ function Settings({ onClose }) {
<a
href="https://hachyderm.io/@phanpy"
// target="_blank"
rel="noopener noreferrer"
rel="noopener"
onClick={(e) => {
e.preventDefault();
states.showAccount = 'phanpy@hachyderm.io';
@ -741,7 +741,7 @@ function Settings({ onClose }) {
<a
href="https://github.com/cheeaun/phanpy"
target="_blank"
rel="noopener noreferrer"
rel="noopener"
>
Built
</a>{' '}
@ -749,7 +749,7 @@ function Settings({ onClose }) {
<a
href="https://mastodon.social/@cheeaun"
// target="_blank"
rel="noopener noreferrer"
rel="noopener"
onClick={(e) => {
e.preventDefault();
states.showAccount = 'cheeaun@mastodon.social';
@ -764,7 +764,7 @@ function Settings({ onClose }) {
<a
href="https://github.com/sponsors/cheeaun"
target="_blank"
rel="noopener noreferrer"
rel="noopener"
>
<Trans>Sponsor</Trans>
</a>{' '}
@ -772,7 +772,7 @@ function Settings({ onClose }) {
<a
href="https://www.buymeacoffee.com/cheeaun"
target="_blank"
rel="noopener noreferrer"
rel="noopener"
>
<Trans>Donate</Trans>
</a>{' '}
@ -780,16 +780,12 @@ function Settings({ onClose }) {
<a
href="https://patreon.com/cheeaun"
target="_blank"
rel="noopener noreferrer"
rel="noopener"
>
Patreon
</a>{' '}
&middot;{' '}
<a
href={PRIVACY_POLICY_URL}
target="_blank"
rel="noopener noreferrer"
>
<a href={PRIVACY_POLICY_URL} target="_blank" rel="noopener">
<Trans>Privacy Policy</Trans>
</a>
</p>
@ -832,7 +828,7 @@ function Settings({ onClose }) {
<a
href={`https://github.com/cheeaun/phanpy/commit/${__COMMIT_HASH__}`}
target="_blank"
rel="noopener noreferrer"
rel="noopener"
>
<RelativeTime datetime={new Date(__BUILD_TIME__)} />
</a>

View file

@ -274,7 +274,7 @@ function Trending({ columnMode, ...props }) {
ref={currentLink === url ? currentLinkRef : null}
href={url}
target="_blank"
rel="noopener noreferrer"
rel="noopener"
class={`link-block ${
hasCurrentLink
? currentLink === url
@ -353,7 +353,7 @@ function Trending({ columnMode, ...props }) {
<a
href={authorUrl}
target="_blank"
rel="noopener noreferrer"
rel="noopener"
>
{authorName}
</a>

View file

@ -218,7 +218,7 @@ function _enhanceContent(content, opts = {}) {
if (TWITTER_MENTION_REGEX.test(html)) {
html = html.replaceAll(
TWITTER_MENTION_CAPTURE_REGEX,
'<a href="https://twitter.com/$2" rel="nofollow noopener noreferrer" target="_blank">$1</a>',
'<a href="https://twitter.com/$2" rel="nofollow noopener" target="_blank">$1</a>',
);
}
fauxDiv.innerHTML = html;

View file

@ -21,6 +21,7 @@ const {
PHANPY_WEBSITE: WEBSITE,
PHANPY_CLIENT_NAME: CLIENT_NAME,
PHANPY_APP_ERROR_LOGGING: ERROR_LOGGING,
PHANPY_REFERRER_POLICY: REFERRER_POLICY,
} = loadEnv('production', process.cwd(), allowedEnvPrefixes);
const now = new Date();
@ -86,6 +87,13 @@ export default defineConfig({
includes: ['log', 'debug', 'info', 'warn', 'error'],
}),
htmlPlugin({
metas: [
// Learn more: https://web.dev/articles/referrer-best-practices
{
name: 'referrer',
content: REFERRER_POLICY || 'origin',
},
],
headScripts: ERROR_LOGGING ? [rollbarCode] : [],
links: [
...ALL_LOCALES.map((lang) => ({