Skip to content

Latest commit

 

History

History
35 lines (24 loc) · 950 Bytes

README.md

File metadata and controls

35 lines (24 loc) · 950 Bytes

Hanabi Browser

An Browser Utils for hanabi code pretty

How To Use

  1. Import JQuery
  2. Import hanabi.min.js on CDN
  3. Download and Import hanabi-browser.min.js from this repo
  4. Use HanabiBrowser.start('css-selector',showlinenumber) to start hanabi code pretty.

Eg.

  HanabiBrowser.start('pre code',true)

API

HanabiBrowser.start(selector,show_line_number)
Start Hanabi Code Pretty

HanabiBrowser.setLinenumber(show_line_number)
Show or Hide Linenumber

HanabiBrowser.toggleLinenumber()
Toggle Linenumber showing

HanabiBrowser.putColor(color)
args color can use an array or a string. Eg. HanabiBrowser.putColor('#EE0000')

HanabiBrowser.defaultColors()
Restore color setting to default.

HanabiBrowser.clearColors()
Empty color poll. You need putColor by your self.