Remove the parts of URLs that humans don't really need to see.
https://example.com -> example.com
http://foo.example.com -> foo.example.com
http://www.oldschool.com -> oldschool.com
https://website.com/ -> website.com
https://a.com/foo#bar -> a.com/foo#bar
HTTP://LOUDBOT.COM -> LOUDBOT.COM
npm install schemeless --save
var schemeless = require('schemeless')
schemeless('https://example.com')
// => example.com
Remove the scheme from text content of all links in a webpage:
document.querySelectorAll('a[href^=http]').forEach(function (a) {
a.textContent = schemeless(a.textContent)
})
- AnchorMe detects URLs and email address in text and converts them to clickable HTML anchor links.
npm install
npm test