From 2fe02bec7ccafc45ec9bfd954a848a731b4f16c3 Mon Sep 17 00:00:00 2001 From: Dessalines <dessalines@users.noreply.github.com> Date: Fri, 12 Feb 2021 12:55:07 -0500 Subject: [PATCH] Removing targets (#179) --- src/shared/components/community-link.tsx | 1 - src/shared/components/community.tsx | 1 - src/shared/components/iframely-card.tsx | 8 +------- src/shared/components/inbox.tsx | 1 - src/shared/components/instances.tsx | 2 +- src/shared/components/main.tsx | 3 --- src/shared/components/markdown-textarea.tsx | 1 - src/shared/components/post-form.tsx | 1 - src/shared/components/post-listing.tsx | 4 ---- src/shared/components/private-message-form.tsx | 1 - src/shared/components/sort-select.tsx | 1 - src/shared/components/user-listing.tsx | 1 - src/shared/components/user.tsx | 4 +--- 13 files changed, 3 insertions(+), 26 deletions(-) diff --git a/src/shared/components/community-link.tsx b/src/shared/components/community-link.tsx index 48dd134..a0f2ba8 100644 --- a/src/shared/components/community-link.tsx +++ b/src/shared/components/community-link.tsx @@ -41,7 +41,6 @@ export class CommunityLink extends Component<CommunityLinkProps, any> { title={apubName} className={`${this.props.muted ? 'text-muted' : ''}`} to={link} - target={this.props.realLink ? '_blank' : ''} > {!this.props.hideAvatar && community.icon && showAvatars() && ( <PictrsImage src={community.icon} icon /> diff --git a/src/shared/components/community.tsx b/src/shared/components/community.tsx index 156a9e9..01fc50c 100644 --- a/src/shared/components/community.tsx +++ b/src/shared/components/community.tsx @@ -341,7 +341,6 @@ export class Community extends Component<any, State> { this.state.communityRes.community_view.community.actor_id, this.state.sort )} - target="_blank" title="RSS" rel="noopener" > diff --git a/src/shared/components/iframely-card.tsx b/src/shared/components/iframely-card.tsx index 3624c95..efd9a90 100644 --- a/src/shared/components/iframely-card.tsx +++ b/src/shared/components/iframely-card.tsx @@ -36,19 +36,13 @@ export class IFramelyCard extends Component< <div class="card-body"> {post.name !== post.embed_title && [ <h5 class="card-title d-inline"> - <a - class="text-body" - target="_blank" - href={post.url} - rel="noopener" - > + <a class="text-body" href={post.url} rel="noopener"> {post.embed_title} </a> </h5>, <span class="d-inline-block ml-2 mb-2 small text-muted"> <a class="text-muted font-italic" - target="_blank" href={post.url} rel="noopener" > diff --git a/src/shared/components/inbox.tsx b/src/shared/components/inbox.tsx index f77f1e2..4cc79ac 100644 --- a/src/shared/components/inbox.tsx +++ b/src/shared/components/inbox.tsx @@ -152,7 +152,6 @@ export class Inbox extends Component<any, InboxState> { <small> <a href={`/feeds/inbox/${UserService.Instance.auth}.xml`} - target="_blank" title="RSS" rel="noopener" > diff --git a/src/shared/components/instances.tsx b/src/shared/components/instances.tsx index 31a4cff..d0831c6 100644 --- a/src/shared/components/instances.tsx +++ b/src/shared/components/instances.tsx @@ -60,7 +60,7 @@ export class Instances extends Component<any, InstancesState> { <ul> {items.map(i => ( <li> - <a href={`https://${i}`} target="_blank" rel="noopener"> + <a href={`https://${i}`} rel="noopener"> {i} </a> </li> diff --git a/src/shared/components/main.tsx b/src/shared/components/main.tsx index a80d787..2b953e8 100644 --- a/src/shared/components/main.tsx +++ b/src/shared/components/main.tsx @@ -594,7 +594,6 @@ export class Main extends Component<any, MainState> { {this.state.listingType == ListingType.All && ( <a href={`/feeds/all.xml?sort=${this.state.sort}`} - target="_blank" rel="noopener" title="RSS" > @@ -604,7 +603,6 @@ export class Main extends Component<any, MainState> { {this.state.listingType == ListingType.Local && ( <a href={`/feeds/local.xml?sort=${this.state.sort}`} - target="_blank" rel="noopener" title="RSS" > @@ -615,7 +613,6 @@ export class Main extends Component<any, MainState> { this.state.listingType == ListingType.Subscribed && ( <a href={`/feeds/front/${UserService.Instance.auth}.xml?sort=${this.state.sort}`} - target="_blank" title="RSS" rel="noopener" > diff --git a/src/shared/components/markdown-textarea.tsx b/src/shared/components/markdown-textarea.tsx index 67d5c41..58e5eff 100644 --- a/src/shared/components/markdown-textarea.tsx +++ b/src/shared/components/markdown-textarea.tsx @@ -291,7 +291,6 @@ export class MarkdownTextArea extends Component< </button> <a href={markdownHelpUrl} - target="_blank" class="btn btn-sm text-muted font-weight-bold" title={i18n.t('formatting_help')} rel="noopener" diff --git a/src/shared/components/post-form.tsx b/src/shared/components/post-form.tsx index 552776d..9cf6147 100644 --- a/src/shared/components/post-form.tsx +++ b/src/shared/components/post-form.tsx @@ -212,7 +212,6 @@ export class PostForm extends Component<PostFormProps, PostFormState> { href={`${archiveUrl}/?run=1&url=${encodeURIComponent( this.state.postForm.url )}`} - target="_blank" class="mr-2 d-inline-block float-right text-muted small font-weight-bold" rel="noopener" > diff --git a/src/shared/components/post-listing.tsx b/src/shared/components/post-listing.tsx index 715bb30..893d78f 100644 --- a/src/shared/components/post-listing.tsx +++ b/src/shared/components/post-listing.tsx @@ -214,7 +214,6 @@ export class PostListing extends Component<PostListingProps, PostListingState> { <a class="float-right text-body d-inline-block position-relative mb-2" href={post.url} - target="_blank" rel="noopener" title={post.url} > @@ -242,7 +241,6 @@ export class PostListing extends Component<PostListingProps, PostListingState> { <a className="text-body" href={post.url} - target="_blank" title={post.url} rel="noopener" > @@ -298,7 +296,6 @@ export class PostListing extends Component<PostListingProps, PostListingState> { <a className="text-muted font-italic" href={post_view.post.url} - target="_blank" title={post_view.post.url} rel="noopener" > @@ -380,7 +377,6 @@ export class PostListing extends Component<PostListingProps, PostListingState> { <a className={!post.stickied ? 'text-body' : 'text-primary'} href={post.url} - target="_blank" title={post.url} rel="noopener" > diff --git a/src/shared/components/private-message-form.tsx b/src/shared/components/private-message-form.tsx index 7a1507d..6d52282 100644 --- a/src/shared/components/private-message-form.tsx +++ b/src/shared/components/private-message-form.tsx @@ -141,7 +141,6 @@ export class PrivateMessageForm extends Component< # <a class="alert-link" - target="_blank" rel="noopener" href="https://element.io/get-started" > diff --git a/src/shared/components/sort-select.tsx b/src/shared/components/sort-select.tsx index ca6984f..5620057 100644 --- a/src/shared/components/sort-select.tsx +++ b/src/shared/components/sort-select.tsx @@ -68,7 +68,6 @@ export class SortSelect extends Component<SortSelectProps, SortSelectState> { <a className="text-muted" href={sortingHelpUrl} - target="_blank" rel="noopener" title={i18n.t('sorting_help')} > diff --git a/src/shared/components/user-listing.tsx b/src/shared/components/user-listing.tsx index a20785a..9efb7c1 100644 --- a/src/shared/components/user-listing.tsx +++ b/src/shared/components/user-listing.tsx @@ -48,7 +48,6 @@ export class UserListing extends Component<UserListingProps, any> { title={apubName} className={this.props.muted ? 'text-muted' : 'text-info'} to={link} - target={this.props.realLink ? '_blank' : ''} > {!this.props.hideAvatar && user.avatar && showAvatars() && ( <PictrsImage src={user.avatar} icon /> diff --git a/src/shared/components/user.tsx b/src/shared/components/user.tsx index 09858bc..241e9f6 100644 --- a/src/shared/components/user.tsx +++ b/src/shared/components/user.tsx @@ -388,7 +388,6 @@ export class User extends Component<any, UserState> { /> <a href={`/feeds/u/${this.state.userName}.xml?sort=${this.state.sort}`} - target="_blank" rel="noopener" title="RSS" > @@ -442,7 +441,6 @@ export class User extends Component<any, UserState> { className={`d-flex align-self-start btn btn-secondary mr-2 ${ !uv.user.matrix_user_id && 'invisible' }`} - target="_blank" rel="noopener" href={`https://matrix.to/#/${uv.user.matrix_user_id}`} > @@ -641,7 +639,7 @@ export class User extends Component<any, UserState> { </div> <div class="form-group row"> <label class="col-lg-5 col-form-label" htmlFor="matrix-user-id"> - <a href={elementUrl} target="_blank" rel="noopener"> + <a href={elementUrl} rel="noopener"> {i18n.t('matrix_user_id')} </a> </label> -- 2.44.1