Created
March 21, 2011 15:49
-
-
Save kamawanu/42b2799917dcf2c34dc5 to your computer and use it in GitHub Desktop.
facebook old xd_receiver.js resize hack.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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