// https://code.google.com/p/xssinterface/source/browse/trunk/js/xssinterface.js\r
X_NET_GIMR_maxQueryLength = X_UA[ 'IE' ] ? 2000 : 6000,\r
\r
- X_NET_GIMR_detection = new Function( 'f,j,i', 'for(j=f.length;j;)try{i=f[--j];return i.location.hash}catch(e){}' ),\r
- \r
X_NET_GIMR_requestBatches,\r
\r
X_NET_GIMR_requestOriginal,\r
\r
function X_NET_GIMR_detectImageOverIframe(){\r
var raw = this[ '_rawObject' ],\r
- iwin, ret, n;\r
+ iwin, ret, i, n;\r
\r
if( raw ){\r
iwin = raw.contentWindow || ( raw.contentDocument && raw.contentDocument.parentWindow ) || window.frames[ X_NET_GIMR_iframeName ];\r
\r
- if( iwin && iwin.frames && iwin.frames.length ){\r
- ret = X_NET_GIMR_detection( iwin.frames );\r
+ if( iwin && iwin.frames && ( i = iwin.frames.length ) ){\r
+ for( ; i; ){\r
+ if( ret = X_Script_try( X_Object_find, [ iwin.frames[ --i ], 'location.hash' ] ) ) break;\r
+ };\r
if( ret && ret !== X_NET_GIMR_lastHashString ){\r
X_NET_GIMR_lastHashString = ret;\r
//console.log( ret.length );\r
iwin.location.href = X_NET_GIMR_GADGET_URL + '#_recived_' + X_NET_GIMR_isReceiveBatches;\r
// speedup\r
X_NET_GIMR_timerID = X_Timer_add( 16, 0, this, X_NET_GIMR_detectImageOverIframe );\r
- return X_Callback_UN_LISTEN;\r
+ return X_CALLBACK_UN_LISTEN;\r
} else {\r
X_NET_GIMR_receivedString = X_Net_GIMR_decodeLocationHash( ret );\r
};\r
\r
- X_NET_GIMRWrapper[ 'asyncDispatch' ]( X_String_parseTrustedJsonString( X_NET_GIMR_receivedString ) );\r
+ X_NET_GIMRWrapper[ 'asyncDispatch' ]( X_JSON_parseTrustableString( X_NET_GIMR_receivedString ) );\r
X_NET_GIMR_receivedString = '';\r
//console.dir( e );\r
\r
X_NET_GIMR_lastHashString = '';\r
iwin.location.href = X_NET_GIMR_GADGET_URL + '#_recived_';\r
\r
- return X_Callback_UN_LISTEN;\r
+ return X_CALLBACK_UN_LISTEN;\r
};\r
++X_NET_GIMR_phase;\r
};\r