Skip to content

Instantly share code, notes, and snippets.

@Saturate
Created June 25, 2012 14:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Saturate/2988955 to your computer and use it in GitHub Desktop.
Save Saturate/2988955 to your computer and use it in GitHub Desktop.
Debug this...
autoSize: function() {ULSTYE:;
var $v_0 = 0;
var $v_1 = 0;
this.$Q_0((SP.ScriptUtility.isNullOrUndefined(this.$G_0.width)) ? 500 : this.$G_0.width, (SP.ScriptUtility.isNullOrUndefined(this.$G_0.height)) ? 20 : this.$G_0.height);
if (this.$0_0) {
try {
var $v_2 = this.$0_0.contentWindow.document;
var $v_3 = $v_2.getElementById('s4-ribbonrow');
var $v_4 = $v_2.getElementById('s4-workspace');
if ($v_3 && $v_4) {
var $v_5 = $v_4.style;
var $v_6 = $v_3.style;
var $v_7 = $v_5.width;
var $v_8 = $v_5.height;
var $v_9 = $v_6.width;
var $v_A = $v_6.height;
$v_5.width = '';
$v_5.height = '';
$v_6.width = '';
$v_6.height = '';
$v_0 = Math.max($v_3.offsetWidth, $v_4.scrollWidth);
$v_1 = $v_3.offsetHeight + $v_4.scrollHeight;
$v_5.width = $v_7;
$v_5.height = $v_8;
$v_6.width = $v_9;
$v_6.height = $v_A;
}
else {
var $v_B = $v_2.getElementById('ms-notdlgautosize');
if ($v_B) {
$v_0 = parseInt(SP.Res.defaultDialogWidth);
$v_1 = parseInt(SP.Res.defaultDialogHeight);
}
else {
$v_0 = this.$0_0.contentWindow.document.body.scrollWidth;
$v_1 = this.$0_0.contentWindow.document.body.scrollHeight;
}
}
}
catch ($$e_2_0) {
}
}
else if (this.$E_0) {
$v_0 = this.$E_0.scrollWidth;
$v_1 = this.$E_0.scrollHeight;
}
$v_0 += SP.UI.Dialog.$1b_0();
$v_1 += SP.UI.Dialog.$1b_0();
if ($v_0 < 50) {
$v_0 = parseInt(SP.Res.defaultDialogWidth);
}
if ($v_1 < 20) {
$v_1 = parseInt(SP.Res.defaultDialogHeight);
}
if (SP.ScriptUtility.isNullOrUndefined(this.$G_0.height)) {
this.$A_0 = $v_1;
}
if (SP.ScriptUtility.isNullOrUndefined(this.$G_0.width)) {
this.$B_0 = $v_0;
}
this.$Q_0(this.$B_0, this.$A_0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment