;(function(){
    var isIOS = window.navigator.userAgent.indexOf( "iPhone" ) >= 0
    ,   screenHeight = screen.height
    ,   screenWidth = screen.width
    ,   pixelRadio = window.devicePixelRatio || 1
    ,   isXModel = isIOS && ( (screenHeight > 894 && screenHeight < 898 && screenWidth === 414 ) || ( screenHeight > 810 && screenHeight < 814 && screenWidth === 375 ) || (screenHeight > 842 && screenHeight < 846 && screenWidth === 390 ))
    ,   resizeCallback = function(){
            setTimeout( function(){
                var documentHeight = document.documentElement.clientHeight
                ,   winHeight = window.innerHeight
                ,   winWidth = window.innerWidth
                ;
                [].forEach.call( document.querySelectorAll( "body,.toolbar,.jobdetail-toolbar") ,function( item ){
                    item.style.paddingBottom = ( winHeight > winWidth && isXModel ) ?  "34px" : 0;
                })
            });
    };
    if( isXModel ){
        [].forEach.call( document.querySelectorAll( ".page-container,.js-leftslidebar") ||[] , function( item ){
            item.style.minHeight = window.innerHeight + "px";
        });
        [].forEach.call( document.querySelectorAll( "body>.common-list-empty") , function( item ){
            let match = ( item.style.marginTop || "" ).match( /(\d+)\%/);
            if( match.length === 2){
                item.style.marginTop = parseInt( window.innerHeight * match[1] / 100 ) + "px";
            }
        });
        document.body.style.boxSizing = "border-box";
        document.body.style.height = "auto";
        document.body.style.minHeight = "100%";
        window.addEventListener( "resize" , resizeCallback , !1 );
        resizeCallback();
    };
    $ && $(resizeCallback);
}());
