Skip to content

Commit

Permalink
feat: add rel=noopener for target='_blank' 😊 #24
Browse files Browse the repository at this point in the history
  • Loading branch information
nicejade committed May 3, 2018
1 parent 716fa54 commit c6bf2db
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/components/AdsPosition.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<el-carousel trigger="click" class="jade-gg-body"
indicator-position="outside" :interval='3600' height="256px">
<el-carousel-item v-for="(item, index) in advertsList" :key="index">
<a :href="item.path" target=_blank>
<a :href="item.path" target="_blank" rel="noreferrer noopener">
<img :src="item.image" :alt="item.alt">
</a>
</el-carousel-item>
Expand Down
1 change: 1 addition & 0 deletions src/components/Contact.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
:href="item.path + item.name"
:title="item.title"
target="_blank"
rel="noreferrer noopener"
:class="item.class"
class="social-btn">
<icon class="icons" :name="item.class"></icon>
Expand Down
13 changes: 8 additions & 5 deletions src/components/linksList/LinkItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,22 @@
@click.stop.prevent="onThemeClick(item.theme)">
{{ fillThemeName(item.classify, item.theme) }}
</span>
<a class="item username" :href="getUserPath(item.createdBy)" target="_blank">
<a class="item username" :href="getUserPath(item.createdBy)" target="_blank" rel="noreferrer noopener">
{{ item.createdBy || '' }}
</a>
<span >{{ item.created | dateOffset }}</span>
<a class="tag"
v-for="(iitem, index) in item.tags" :key="index"
:href="getTagPath(iitem)" target="_blank"
>
:href="getTagPath(iitem)"
target="_blank" rel="noreferrer noopener">
{{ iitem }}
</a>
</div>
<h3 class="title">
<a class="title-link" :href="item.urlPath" target="_blank">{{ item.title }}</a>
<a class="title-link" :href="item.urlPath"
target="_blank" rel="noreferrer noopener">
{{ item.title }}
</a>
</h3>
<div class="abstract" v-if="isAbstract">
{{ item.abstract || $util.interceptString(item.desc) }}
Expand All @@ -30,7 +33,7 @@
<div class="link-desc"
v-html="this.obtainLinkDesc(item)">
</div>
<hr class="segmenting-line">
<hr v-if="item.review" class="segmenting-line">
<div v-if="item.review" class="link-review">
<preview-md
:value="reviewPrefix + item.review">
Expand Down
11 changes: 8 additions & 3 deletions src/partials/FooterNav.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div class="footer-body">
<div class="content">
<p>
<a target="_blank" class="link gtag-track" href="/"
<a target="_blank" rel="noreferrer noopener" class="link gtag-track" href="/"
data-action="footer-nicelinks" data-category="footer" data-label="footer-nicelinks">
{{ $t('niceLinksStr') }}
</a>
Expand All @@ -19,15 +19,20 @@
:href="item.path + item.name"
:title="item.title"
target="_blank"
rel="noreferrer noopener"
:class="item.class"
class="social-btn gtag-track">
<icon class="icons" :name="item.class"></icon>
</a>
</div>
<div class="icp">
<span>{{ copyright }}</span>
<a class="link gtag-track" target="_blank" href="http://jeffjade.com"
data-action="footer-jeffjade" data-category="footer" data-label="footer-jeffjade">
<a class="link gtag-track"
href="https://jeffjade.com"
target="_blank" rel="noreferrer noopener"
data-action="footer-jeffjade"
data-category="footer"
data-label="footer-jeffjade">
晚晴幽草轩
</a>
{{ $t('produced') }}
Expand Down
2 changes: 1 addition & 1 deletion src/views/manage/Adverts.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<el-carousel trigger="click" class="jade-gg-body"
indicator-position="outside" :interval='3600' height="256px">
<el-carousel-item v-for="(item, index) in tableData" :key="index">
<a :href="item.path" target=_blank>
<a :href="item.path" target="_blank" rel="noreferrer noopener">
<img :src="item.image">
</a>
</el-carousel-item>
Expand Down
3 changes: 2 additions & 1 deletion src/views/manage/Links.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
</el-table-column>
<el-table-column prop="urlPath" :label="$t('linkAddressStr')" min-width="180">
<template scope="scope">
<a class="title-link" :href="scope.row.urlPath" target="_blank">
<a class="title-link" :href="scope.row.urlPath"
target="_blank" rel="noreferrer noopener">
{{ scope.row.title }}
</a>
</template>
Expand Down

0 comments on commit c6bf2db

Please sign in to comment.