neko-dev / hanabi-browser

An Browser Utils for hanabi code pretty.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

An Browser Utils for hanabi code pretty.

License:GNU General Public License v3.0


Languages

Language:JavaScript 100.0%