1
0
Fork 0
mirror of https://github.com/GuerillaStudio/vanillalist.git synced 2024-10-22 17:37:29 +00:00

Add rel="noopener" to externalinks

This commit is contained in:
Tixie 2021-03-01 04:03:23 +01:00
parent 6601c22bd7
commit ced2596ee9
2 changed files with 3 additions and 3 deletions

View file

@ -1,3 +1,3 @@
<footer class="footer">
Copyleft ∴ <a href="https://glitch.family">Glitch.Family</a> — This project is <a href="https://github.com/GlitchFamily/vanillalist">open-source</a> but the plugin's visuals belong to their respective owners
Copyleft ∴ <a href="https://glitch.family">Glitch.Family</a> — This project is <a href="https://github.com/GlitchFamily/vanillalist" rel="noopener">open-source</a> but the plugin's visuals belong to their respective owners
</footer>

View file

@ -5,14 +5,14 @@ module.exports = function (plugin) {
if (plugin.url_npm) { sources.push({ label: 'npm', url: plugin.url_npm }) }
const links = sources.map(source => {
return `<a class="plugin__link plugin__link--${source.label}" href="${source.url}?ref=vanillalist" target="_blank">${source.label}</a>`
return `<a class="plugin__link plugin__link--${source.label}" href="${source.url}?ref=vanillalist" target="_blank" rel="noopener">${source.label}</a>`
}).join('')
const visualLink = plugin.url_demo ? plugin.url_demo : plugin.url_github ? plugin.url_github : plugin.url_npm ? plugin.url_npm : ''
return `
<div class="plugin">
<a class="plugin__visual" href="${visualLink}?ref=vanillalist">
<a class="plugin__visual" href="${visualLink}?ref=vanillalist" target="_blank" rel="noopener">
<img srcset="${plugin.image} 1x, ${plugin.image2x} 2x" alt="${plugin.title}" width="308" height="195">
</a>
<h2 class="plugin__name">${plugin.title}</h2>