Skip to content

Instantly share code, notes, and snippets.

@ryanb
ryanb / github_tree_slider.js
Created December 6, 2010 17:23
This is how GitHub's new AJAX file browser works.
GitHub.TreeSlider = function () {
if (window.history && window.history.pushState) {
function a() {
if (e.sliding) {
e.sliding = false;
$(".frame-right").hide();
$(".frame-loading:visible").removeClass("frame-loading")
}
}
if (!($("#slider").length == 0 || !GitHub.shouldSlide)) if (!navigator.userAgent.match(/(iPod|iPhone|iPad)/)) {
@gjcourt
gjcourt / iPhone Scale.js
Created October 29, 2010 07:19
get the scale on all iDevices
function scale() {
return document.body.clientWidth / window.innerWidth;
}