Skip to content

Instantly share code, notes, and snippets.

@yeco
Created September 30, 2010 19:40
Show Gist options
  • Select an option

  • Save yeco/605180 to your computer and use it in GitHub Desktop.

Select an option

Save yeco/605180 to your computer and use it in GitHub Desktop.
if($.browser.webkit) {
FB.Canvas.setSize = function(params) {
if (typeof params != "object") {
params = {};
}
params = FB.copy(params || {}, FB.Canvas._computeContentSize());
// Deep compare
if (FB.Canvas._lastSize &&
FB.Canvas._lastSize.width == params.width &&
FB.Canvas._lastSize.height == params.height) {
return false;
}
FB.Canvas._lastSize = params;
// Previously a FB.Canvas._sendMessageToFacebook() call
FB.Arbiter.inform('setSize', {height: params.height});
return true;
};
}
FB.Canvas.setAutoResize();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment