@numiko/external-links
v1.4.1
Published
This JavaScript module provides functionality for handling external links on a webpage.
Downloads
12
Readme
External Links
This JavaScript module provides functionality for handling external links on a webpage.
Features
Once initialised this package will check a site for any links pointing to an external source. It will in turn change their behaviour so that they are opened in a new tab. 'Opens in new tab' will also be added to the aria-label attribute of these links.
Installation
npm i @numiko/external-links
Usage
JS
import { ExternalLinks } from '@numiko/external-links';
const links = document.links;
new ExternalLinks(links);API
See documentation for more detail on how to use the package.
