Skip to content

Latest commit

 

History

History
35 lines (19 loc) · 517 Bytes

Readme.md

File metadata and controls

35 lines (19 loc) · 517 Bytes

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