Skip to content

A simple web-service that allows GitHub Gists to be used via AJAX

Notifications You must be signed in to change notification settings

hackerkid/ajax-gist

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ajax-Gist

Ajax-Gist is a simple web-service that acts as a proxy between your website and the GitHub Gist service to provide a translation of the Gist embed code that is AJAX friendly.

The normal Gist embed code uses Javascript ‘document.write’ commands to insert the Gist into your webpage. This is a problem when you want to insert a Gist after the page has loaded as ‘document.write’ will wipe out the current content of the page!

This service is mainly aimed at people that need to embed Gists in their application in a non-standard fashion. The service was inspired by the need to embed Gists in pages via AJAX for ReadMyCode.org

To use the service simply grab the Gist ID that you’re after and embed it in a script tag pointing to the web-service like so:

<script src="http://ajax-gist.com/gist/419993.js" type="text/javascript"></script>
                                         ^ Gist ID

Check out the examples page to see simple demos using the service both statically and dynamically.

Gists accessed via this web-service are cached for 30 minutes, so if you make any changes to an existing Gist it will take 30 minutes before you see the changes.

Author & Credits

Author

Aaron Gough

Copyright © 2010 Aaron Gough (thingsaaronmade.com), released under the MIT license

About

A simple web-service that allows GitHub Gists to be used via AJAX

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 52.3%
  • HTML 31.0%
  • JavaScript 10.1%
  • CSS 6.6%