Giter Site home page Giter Site logo

urlhighlight's Introduction

urlhighlight

urlhighlight is licensed under the MIT license.

urlhighlight is a tiny (888B minified and gzipped) JavaScript library for syntax highlighting URLs. Its function is very apparent from its usage:

urlhighlight({ url: 'http://www.example.com/section/article?id=123#top' })

// returns (new lines added for readability):

<span class="url-protocol">http:</span>
<span class="url-protocol-delimiter">//</span>
<span class="url-host">www.example.com</span>
<span class="url-path">/section/article</span>
<span class="url-query-delimiter">?</span>
<span class="url-query-param-name">id</span>
<span class="url-query-param-assign">=</span>
<span class="url-query-param-value">123</span>
<span class="url-hash-delimiter">#</span>
<span class="url-hash">top</span>

Features:

  • syntax highlights URLs
  • custom templates
  • lightweight (888B minified and gzipped)
  • support for data-uri
  • support for AMD (asynchronous module definition)
  • free

CSS classes (used in default templates)

  • url-protocol
  • url-protocol-delimiter
  • url-host
  • url-port-delimiter
  • url-port
  • url-path
  • url-query-delimiter
  • url-query-param-name
  • url-query-param-assign
  • url-query-param-value
  • url-query-param-delimiter
  • url-hash-delimiter
  • url-hash

data-uri specific:

  • url-mime-type
  • url-mime-type-delimiter
  • url-encoding
  • url-encoding-delimiter
  • url-data

Bitdeli Badge

urlhighlight's People

Contributors

bitdeli-chef avatar daviddurman avatar rappid-deploy avatar

Watchers

Jihchi Lee avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.