Coder Social home page Coder Social logo

aaronliu0130 / asciinema-player-for-github Goto Github PK

View Code? Open in Web Editor NEW

This project forked from plibither8/asciinema-player-for-github

0.0 1.0 0.0 387 KB

๐ŸŽฌโœจ Browser extension to automatically detect asciinema links in a project's README and embed the asciinema player in its place

License: MIT License

JavaScript 100.00%

asciinema-player-for-github's Introduction

asciinema Player for GitHub

Licence Chrome Web Store Mozilla Add-on Made with love in India

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. ๐ŸŽ‰

Demo

Install

Development

  1. Clone this repository by running
    git clone https://github.com/plibither8/asciinema-player-for-github.git
    
  2. Ensure you are running an up-to-date version of Node.js on your machine, and that you have npm installed.
  3. Open a terminal in the asciinema-player-for-github directory. Type
    npm install
    
    into the terminal to install the dependencies. To build the extension, type
    npm run watch
    
  4. The extension files including the manifest.json file are in the dist/ directory.

Content Security Policy Modification

Just FYI: to allow third-party iframes (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

Donate

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!

Donate

Buy Me A Coffee


License

Copyright (c) Mihir Chaturvedi. All rights reserved.

Licensed under the MIT License.

asciinema-player-for-github's People

Contributors

plibither8 avatar

Watchers

 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.