Skip to content
Snippets Groups Projects

Display an ANSI in a webv4 page.

  • Clone with SSH
  • Clone with HTTPS
  • Embed
  • Share
    The snippet can be accessed without any authentication.
    Authored by echicken
    Edited
    snippetfile1.txt 396 B
    <?xjs
        var f = new File('/path/to/some.ans');
        f.open('r');
        var ans = base64_encode(f.read());
        f.close();
    ?>
    
    <div id="ansi-container"></div>
    
    <script type="text/javascript" src="./js/graphics-converter.js"></script>
    <script type="text/javascript">
        const gc = new GraphicsConverter();
        const ans = atob('<? write(ans); ?>');
        gc.from_ans(ans, '#ansi-container');
    </script>
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Please register or to comment