Skip to content

juliangruber/command-click

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

command-click

Make links in a text command-click-able.

Example

var clickable = require('command-click');
var el = document.querySelector('p');

clickable(p);

Installation

Install with component(1):

$ component install juliangruber/command-click

API

clickable(el)

Wrap each link inside el in a <span> and on CMD+Click open it in a new tab/window.

Returns the unbind function.

unbind()

Stop listening for events.

License

MIT

About

Make links in a text command-click-able.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published