Automatically detect instances of asciinema links in a README on GitHub and embed the player in its place.
This is a lightweight Chrome extension. Instead of being directed to the asciinema website to watch the "asciicast", watch it directly in the README (or any .md
, .rst
, .textile
, etc. file), thanks to the embedded player widget. 🎉
git clone https://github.com/plibither8/asciinema-player-for-github.git
asciinema-player-for-github
directory. Type
npm install
into the terminal to install the dependencies. To build the extension, type
npm run watch
manifest.json
file are in the dist/
directory.Just FYI: to allow third-party iframe
s (in this case, from asciinema.org
) to be rendered on github.com, the Content-Security-Policy (CSP) in the response headers of github.com are modified by this extension. The following modification takes place:
Before:
frame-src render.githubusercontent.com;
After:
frame-src asciinema.org render.githubusercontent.com;
For more details: Content Security Policy (CSP) - Google Chrome
Code: background.js
asciinema Player for GitHub was made by me during my study-breaks and free time. If you like and have enjoyed it, please consider donating a small amount (any amount will be really appreciated!) to support and sustain its development. Thank you!
Copyright (c) Mihir Chaturvedi. All rights reserved.
Licensed under the MIT License.