1.1.1 • Published 5 years ago

customise-links v1.1.1

Weekly downloads
6
License
MIT
Repository
github
Last release
5 years ago

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 and externalLink 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).

https://www.npmjs.com/package/customise-links