Skip to content

Instantly share code, notes, and snippets.

@kamawanu
Created March 21, 2011 15:49
Show Gist options
  • Save kamawanu/42b2799917dcf2c34dc5 to your computer and use it in GitHub Desktop.
Save kamawanu/42b2799917dcf2c34dc5 to your computer and use it in GitHub Desktop.
facebook old xd_receiver.js resize hack.
var pos = document.location.hash.search( /setCanvasHeight/ )
if( pos >= 0 ){
hashvpos = document.location.hash.search( /setCanvasHeight%22%2C%22([0-9]+)px/ );
crop = document.location.hash.substring(hashvpos+24);
pxpos = crop.search("px");
heighthack = crop.substring( 0, pxpos );
if( heighthack > 300 ){
newv = document.location.hash.replace( "setCanvasHeight%22%2C%22"+heighthack, "setCanvasHeight%22%2C%22300" );
document.location.hash = newv;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment