Skip to content

Instantly share code, notes, and snippets.

@Synvox
Created October 17, 2012 22:17
Show Gist options
  • Save Synvox/3908686 to your computer and use it in GitHub Desktop.
Save Synvox/3908686 to your computer and use it in GitHub Desktop.
Canvas Rider Track
(function(){
scriptElement = document.body.appendChild(document.createElement('script'));
scriptElement.type='text/javascript';
scriptElement.src='http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js';
scriptElement.onload = function(){
(function($){
$.noConflict();
if ($('#track_menu').length == 0){
$("#canvas_rider").after('<div id="track_menu"></div>');
}
$('#track_menu').html('Loading track information...')
$.post('http://canvasrider.com/js/load.php', {
track: Number(window.location.pathname.substring(window.location.pathname.lastIndexOf('/')+1,window.location.pathname.length))
},function(a) {
$('#track_menu')
.html('')
.append('<h1>Code for this track:</h1><textarea rows="20"></textarea>')
.find('textarea')
.html(a);
});
})(jQuery);
}
})();
@Synvox
Copy link
Author

Synvox commented Oct 17, 2012

There seems to be a problem Shmee

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment