Coder Social home page Coder Social logo

l33t-xyz / xterm.js Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hacktoolkit/xterm.js

2.0 1.0 0.0 27 KB

A drop-in JavaScript module to colorize Xterm output (both ANSI 16 + 256 colors) on your webpages. Absolutely no external dependencies required!

Home Page: http://www.l33t.xyz/xterm.js/

License: MIT License

HTML 100.00%

xterm.js's Introduction

xterm.js

A drop-in JavaScript module to colorize Xterm output (both ANSI 16 + 256 colors) on your webpages. Absolutely no external dependencies required!

Live Demo

A demo is worth a thousand words.

How It Works

Like magic, it turns simple HTML markup using the <code> tag with the xterm class:

<code class="xterm">
@g[1] Your flame @G<@W*><-:-><*@G> @YSLAUGHTERS @G<@W*><-:-><*@G>@w @gan antlion! @R[358]
@RAn antlion screams as the flames engulf it!!
@wYou receive @G68+7+@R7@w experience points.
@wYou receive @G82@w bonus experience points from your daily blessing.
@wYou have @Y71@w daily blessing bonus experience kills remaining.
@wYou get @Y6,790@w gold coins from the charred corpse of an antlion.
@MYou are taxed @Y67@M gold coins by your clan.
@wYou get an @ra@wn@rt@wl@ri@wo@rn @Y{@whusk@Y}@w from the charred corpse of an antlion.
@cThe Fallen Soldier gives you @Y62@c gold coins for the charred corpse of an antlion.
</code>

... into l33t output you can share with your MUD and RL friends:

image

Get Started in under 30 seconds

It's as easy as 1, 2, 3!

  1. Wrap all Xterm output you would like to format as colorized with:
    <code class="xterm">...</code>.
  2. Include this line before the closing </body> tag of your HTML document:
    <script type="text/javascript" src="//l33t-xyz.github.io/xterm.js/xterm.js"></script>
    (Alternatively, if you would like, download the file xterm.js and upload it to your webserver to host it locally.)
  3. Profit!

If you're using a preprocessor like Markdown or MDX, the language-xterm class also works.

Authors

Created by Hacktoolkit and maintained by L33t.xyz.

Contributing

Pull requests are welcome! If you would like to contribute to this project, please fork this repository, create a branch, and submit a pull request.

All meaningful code contributions will be recognized in CONTRIBUTORS.md.

License

See LICENSE.md

xterm.js's People

Contributors

l33t-xyz-bot avatar

Stargazers

 avatar Jonathan Tsai avatar

Watchers

James Cloos 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.