Skip to content

ghostflyby/asciinema-github-userjs

Repository files navigation

Asciinema GitHub Userscript

Overview

Asciinema GitHub Userscript is a userscript that automatically embeds Asciinema players into GitHub. It detects asciinema.org/a links with preview in Markdown content and replaces them with an embedded player.

Installation

  1. Install a userscript manager for your browser, such as Tampermonkey
  2. install https://github.com/ghostflyby/asciinema-github-userjs/blob/dist/asciinema-github.user.js

Usage

After installing the script, visit a GitHub page containing Asciinema links, such as the asciinema project page

build

install pnpm

pnpm install
pnpm run build

The script is in dist/asciinema-github.user.js

Note

Due to the CSP of GitHub, the AsciinemaPlayer library is bundled into the script.

If you don't trust the prebuilt script, you can build it yourself.

About

View Asciinema directly in README and other markdown on GitHub

Topics

Resources

License

Stars

Watchers

Forks