ニコニコ maxWidth ? maxWidth : Math.max(baseWidth, minWidth), height: baseWidth > maxWidth ? maxHeight : Math.max(minHeight * (baseWidth / minWidth), minHeight) }; } var angle = screenOrientationAngle(); var size = angle !== null ? (angle % 180 === 0 // portrait時に広告を表示した時のサイズ設定 ? { portrait: getOverlayAdSize(_window.screen.width), landscape: getOverlayAdSize(_window.screen.height) } // landscape時に広告を表示した時のサイズ設定 : { portrait: getOverlayAdSize(_window.screen.height), landscape: getOverlayAdSize(_window.screen.width) }) : null; return size; }, getScreenOrientation: function getScreenOrientationAngle() { return screenOrientationAngle() % 180 === 0 ? ‘portrait’ : ‘landscape’; } }; })(window); ]]>
Source