customise-links
v1.1.1
Published
customise external and internal links on your app
Downloads
6
Maintainers
Readme
customise-links
Esures that all external links on your app opens in a new tab when the link is clicked.
Installation
customise-links may be installed via npm with
npm install customise-links --save
Usage
const customiseLinks = require('customise-links');
Call the function in your codebase with: customiseLinks()
What customiseLinks() will do
- Make external links to open in new tab, while internal links retain their default behaviour.
- Adds class
internalLink
andexternalLink
to internal and external links respectively, so you can do more customisation with your JavaScript and CSS. - Adds HTML attribute
rel= "noopener"
to external links for security reason (prevents the newly opened page from having the ability to control the page that delivered the traffic).