Home

Awesome

GifW00t!

<img src="https://raw.githubusercontent.com/yaronn/pacman/master/img/demo8.gif" width="220px" /> <img src="https://raw.githubusercontent.com/yaronn/pacman/master/img/demo10.gif" width="200px" /> <img src="https://raw.githubusercontent.com/yaronn/pacman/master/img/demo11.gif" width="230px" />

Examples Gallery

More in my twitter - @YaronNaveh

You may also like building ascii dashboards in the terminal.

What is GifW00t!?

GifW00t! is a pure-javascript web recorder. Just add one script tag to your page, and users will be able to record and replay their interaction with the site. Some of the possibilities:

Oh and did I mention that you can use GifW00t! on 3rd party sites as well?

For more information check out @YaronNaveh, the project sample site, or my blog.

How to use GifW00t!?

There are 4 options:

1. You surf in a site that already embeds GifW00t!

In this case all you need is to work with the GifW00t! panel bar.

2. You surf in a site that does not embed GifW00t!

No problem. Open Chrome developer tools (CTRL+J) or Firefox Firebug and paste this code in the console:

var anigif_base_url = "https://s3-us-west-2.amazonaws.com/anigif100/anigif/"
var ref=document.createElement('script')
ref.setAttribute("src", "https://s3-us-west-2.amazonaws.com/anigif100/anigif/anigif.min.js")
document.head.appendChild(ref)

wait a few seconds and the GifW00t! panel bar will appear. You can also set both urls to https if you need ssl.

3. You develop a website and want to embed GifW00t!

Option 1 - refer directly to GifW00t! server

Just add this code inside your <head>:

<script>
    var anigif_base_url = "https://s3-us-west-2.amazonaws.com/anigif100/anigif/"
</script>
<script src="https://s3-us-west-2.amazonaws.com/anigif100/anigif/anigif.min.js"></script>

Option 2 - serve GifW00t! yourself (it is just static files)

Copy /anigif from this project to your web site root. Then in your html add this:

<script src="https://s3-us-west-2.amazonaws.com/anigif100/anigif/anigif.min.js"></script>

4. You want a bookmarklet, because you can.

javascript:(function(a)%7Bwindow.anigif_base_url%3Da%3Bvar%20b%3Ddocument.createElement(%22script%22)%3Bb.src%3Da%2B%22anigif.min.js%22%3Bdocument.head.appendChild(b)%7D)(%22https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fanigif100%2Fanigif%2F%22)%3B%0A

Compatibility

Should work on Chrome>29, and Firefox>24 and Safari 7. Will probably not work on some other browsers since some very new browser features are required.

Settings

Click the GifW00t! panel bar settings button in order to change record settings. Important settings are:

Element to record: What element in your page should GifW00t! capture (including sub elements). The value is a CSS selector. For example if you want to capture '<div id="main">' set the value to '#main'. If you only have one canvas and want to capture it just write 'canvas' (it will use a tag selector). If you only want to record a canvas then you should write a selector directly to the canvas and not to some DIV around it - you would see better performance. Always choose this value such that you record the smallest DOM possible for your needs.

Period mode: Online means that many of the calculations are done during record, and offline means that all is done after record. Online has the advantage of being more accurate in capturing the page and generating the image faster. However if you define a high frame-per-record or a ratio that differs from 1 then the online calculations will slow down your flow while recording.

Frames per second: How many frames should GifW00t! capture each second. This heavily affects performance

Optimization

Here are the top ways to make GifW00t! render images faster:

Examples:

Special Thanks

GifW00t! uses some amazing libraries including html2canvas by @Niklasvh and jsgif by @antimatter15. Also special thanks to @daleharvey on the great HTML5 Pac-Man and helicopter games which I've used a lot while testing.

More information

Check out @YaronNaveh, the project sample site, or my blog.