mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-15 06:35:20 -07:00
Use rel=“noopener” on non-relative links
This commit is contained in:
parent
7c6bdef5f4
commit
4ce21fa890
1 changed files with 8 additions and 0 deletions
|
|
@ -3,6 +3,7 @@
|
|||
<a
|
||||
:href="href"
|
||||
:target="target"
|
||||
:rel="rel"
|
||||
role="button"
|
||||
class="relative inline-flex items-center px-4 py-2 border border-transparent leading-5 font-medium rounded-md text-white bg-darker neumorphic-shadow hover:bg-indigo-400 focus:outline-none focus:shadow-outline-indigo focus:border-indigo-600 active:bg-indigo-600 transition duration-150 ease-in-out"
|
||||
>
|
||||
|
|
@ -23,6 +24,13 @@ export default {
|
|||
type: String,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
rel () {
|
||||
if (this.href.charAt(0) === '/') return null
|
||||
|
||||
return 'noopener'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue