🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more →
Socket
Book a DemoInstallSign in
Socket

link-ping

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

link-ping

Inspired by Invision, when a user clicks outside a link, clickable links are highlighted.

latest
Source
npmnpm
Version
2.1.0
Version published
Maintainers
1
Created
Source

Plugin for your HTML prototypes.

Inspired by Invision, when a user clicks outside a clickable link, clickable links are highlighted.

Pro tip: Hold shift to highlight all clickable areas.

Install

$ npm install link-ping

How to use

Default usage

index.html

<!DOCTYPE html>
<html>
  <head>
    <title>Link Ping Example</title>
    <meta charset="utf-8">
  </head>
  <body>
    <a href="link.html">Linky link</a> <!-- WILL highlight when clicked outside -->
    <a>Linky link</a> <!-- Will NOT highlight when clicked outside -->
    <a href="#">Linky link</a> <!-- Will NOT highlight when clicked outside -->
    <script src="./app.js" charset="utf-8"></script>
  </body>
</html>

app.js

import LinkPing from '../dist/link-ping'

const linkPing = new LinkPing('body')

Slightly more advanced usage

index.html

<!DOCTYPE html>
<html>
  <head>
    <title>Link Ping Example</title>
    <meta charset="utf-8">
  </head>
  <body>
    <a href="link.html">Linky link</a> <!-- WILL highlight when clicked outside -->
    <span class="js-link">Linky link</span> <!-- WILL highlight when clicked outside -->
    <a href="#">Linky link</a> <!-- Will NOT highlight when clicked outside -->
    <script src="./app.js" charset="utf-8"></script>
  </body>
</html>

app.js

import LinkPing from '../dist/link-ping'

const linkPing = new LinkPing('body', {
  include: ['.js-link']
})

Keywords

ping

FAQs

Package last updated on 11 Feb 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts