4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
\r
6 <title>Logger</title>
\r
8 <meta name="HandheldFriendly" content="true">
\r
9 <meta name="mobileoptimized" content="0">
\r
11 <!-- for ie & chrome frame -->
\r
12 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
\r
13 <meta http-equiv="imagetoolbar" content="no">
\r
15 <!-- for smartphone -->
\r
16 <meta name="format-detection" content="telephone=no">
\r
17 <meta name="apple-mobile-web-app-capable" content="yes">
\r
19 <!-- maximum-scale=1 初代iPod touch で必要, dynamic-viewport は operaで可能 -->
\r
20 <meta name="viewport" id="dynamic-viewport" content="width=device-width,target-densitydpi=device-dpi,initial-scale=1,user-scalable=0,maximum-scale=1,minimum-scale=1">
\r
24 font-size : 100%; /* 1 */
\r
25 -webkit-text-size-adjust : 100%; /* 2 */
\r
26 -moz-text-size-adjust : 100%; /* 2 */
\r
27 -ms-text-size-adjust : none; /* 2 */
\r
28 text-size-adjust : 100%; /* 2 */
\r
30 touch-action : none;
\r
31 -ms-touch-action : none;
\r
32 touch-callout : none;
\r
33 -webkit-touch-callout : none;
\r
34 content-zooming : none;
\r
35 -ms-content-zooming : none;
\r
37 -khtml-user-drag : none;
\r
38 -webkit-user-drag : none;
\r
47 background : #FF66FF;
\r
58 position : absolute;
\r
71 font-family : Arial;
\r
72 position : absolute;
\r
79 text-align : center;
\r
83 -webkit-tap-highlight-color : rgba(0,0,0,0);
\r
86 .toggle_none #toggle {
\r
89 .toggle_none iframe {
\r
90 margin-left : 240px;
\r
93 /*--------------------------------------------------------------------------------------
\r
96 .toggle_open_anime #log,
\r
97 .toggle_close_anime #log,
\r
98 .toggle_close_before #log, .toggle_open_before #log /* win safari3.2 */
\r
100 -webkit-transition : 0.5s ease-in-out; /* win safari3.2 */
\r
101 -webkit-transition : opacity 0.5s ease-in-out, left 0.5s ease-in-out, -webkit-transform 0.5s ease-in-out, transform 0.5s ease-in-out; /* win safari4 delay は指定しない */
\r
103 /* http://blog.webcreativepark.net/2012/10/19-161432.html */
\r
104 -webkit-backface-visibility : hidden;
\r
105 -moz-backface-visibility : hidden;
\r
106 backface-visibility : hidden;
\r
108 transition : opacity 0.5s ease-in-out 0s, left 0.5s ease-in-out 0s, transform 0.5s ease-in-out 0s;
\r
109 -o-transition : opacity 0.5s ease-in-out 0s, left 0.5s ease-in-out 0s, transform 0.5s ease-in-out 0s, -o-transform 0.5s ease-in-out 0s;
\r
110 -ms-transition : opacity 0.5s ease-in-out 0s, left 0.5s ease-in-out 0s, transform 0.5s ease-in-out 0s, -ms-transform 0.5s ease-in-out 0s;
\r
111 -moz-transition : opacity 0.5s ease-in-out 0s, left 0.5s ease-in-out 0s, transform 0.5s ease-in-out 0s, -moz-transform 0.5s ease-in-out 0s;
\r
115 .toggle_open_anime #log,
\r
117 .toggle_close_before #log {
\r
119 -webkit-transform : translate(0%,0); /* win safari3.2 */
\r
120 -webkit-transform : translateX(0%) translateZ(0); /* safari4 */
\r
121 -moz-transform : translateX(0%) translateZ(0);
\r
122 -ms-transform : translateX(0%) translateZ(0);
\r
123 -o-transform : translateX(0%) translateZ(0);
\r
124 transform : translateX(0%) translateZ(0);
\r
128 .toggle_close_anime #log,
\r
129 .toggle_close #log,
\r
130 .toggle_open_before #log {
\r
132 -webkit-transform : translate(-10%,0); /* win safari3.2 */
\r
133 -webkit-transform : translateX(-10%) translateZ(0); /* safari4 */
\r
134 -moz-transform : translateX(-10%) translateZ(0);
\r
135 -ms-transform : translateX(-10%) translateZ(0);
\r
136 -o-transform : translateX(-10%) translateZ(0);
\r
137 transform : translateX(-10%) translateZ(0);
\r
143 // ff5+(-moz, 16+), ie10+, opera12+(-o, 12.5+), safari4+(-webkit, ?), iOS2+, Android2.1+
\r
144 // http://lealog.hateblo.jp/entry/2013/03/06/234023
\r
147 // ff4+(-moz, 16+), ie10+, opera11.6+(-o, 12.1+), safari3.0+(-webkit, ?), iOS(safari3.2+), Android2.1+
\r
148 // https://developer.mozilla.org/ja/docs/Web/CSS/transition
\r
151 // ff3.5+(-moz, 16+), ie9+(-ms, 10+), opera10.5+(-o, 12.1+), safari3.1+(-webkit, ?)
\r
152 // https://developer.mozilla.org/ja/docs/Web/CSS/transform
\r
154 var EV_TRANS_END = document.getElementById && (function(){
\r
155 var style = document.createElement( 'div' ).style;
\r
156 return style[ 'transition' ] !== void 0 ? 'transitionend' :
\r
157 style[ 'OTransition' ] !== void 0 ? 'otransitionend' :
\r
158 style[ 'msTransition' ] !== void 0 ? 'msTransitionEnd' :// 'MSTransitionEnd' :
\r
159 style[ 'MozTransition' ] !== void 0 ? 'transitionend' :
\r
160 style[ 'webkitTransition' ] !== void 0 ? 'webkitTransitionEnd' : false;
\r
162 USE_ANIME = !!EV_TRANS_END,
\r
166 toggleBusy = false;
\r
170 setTimeout(function(){scrollTo(0, 1);}, 100);
\r
171 if( window.addEventListener ){
\r
172 window.addEventListener( 'orientationchange', function(){
\r
173 setTimeout(function(){
\r
174 //alert( window.innerWidth + 'x' + window.innerHeight );
\r
181 function __resize( toggleChanged ){
\r
182 var body = document.body,
\r
183 log = body.children[0],
\r
184 ifr = body.children[1],
\r
185 btn = body.children[2],
\r
186 viewW = document.all ? ( document.documentElement || body ).offsetWidth || window.innerWidth /* for ie9 */ : window.innerWidth,
\r
187 viewH = window.innerHeight;
\r
189 if( 800 <= viewW ){
\r
190 ifr.style.width = viewW - LOG_WIDTH + 'px';
\r
191 if( !document.all ){
\r
192 ifr.style.height = viewH + 'px'; // NetFront3.4
\r
194 body.className = 'toggle_none';
\r
196 if( viewW < 240 ) log.style.width = viewW + 'px';
\r
198 ifr.style.width = viewW + 'px';
\r
199 if( !document.all ){
\r
200 ifr.style.height = viewH + 'px'; // NetFront3.4
\r
202 if( USE_ANIME && toggleChanged ){
\r
204 body.className = toggleOpen ? 'toggle_open_before' : 'toggle_close_before';
\r
205 setTimeout( __readyTrans, 60 ); // 0 は不可
\r
207 body.className = toggleOpen ? 'toggle_open' : 'toggle_close';
\r
210 btn.innerHTML = toggleOpen ? '▶' : '▼';//►▸
\r
212 function __readyTrans(){
\r
213 var body = document.body,
\r
214 log = body.children[0],
\r
215 _class = body.className,
\r
216 i = _class.indexOf( '_before' );
\r
219 body.className = _class.substr( 0, i ) + '_anime';
\r
221 log.addEventListener( EV_TRANS_END, __onTrans, true );
\r
222 log.style.cssText = toggleOpen ?
\r
223 'opacity:1;-webkit-transform:translate(0,0);' :
\r
224 'opacity:0;-webkit-transform:translate(-10%,0);'; /* win safari3.2 */
\r
229 function __onTrans(e){
\r
230 var body = document.body,
\r
231 log = body.children[0],
\r
232 _class = body.className,
\r
233 i = _class.indexOf( '_anime' );
\r
235 log.removeEventListener( EV_TRANS_END, __onTrans, true );
\r
236 log.style.cssText = '';
\r
237 body.className = _class.substr( 0, i );
\r
238 toggleBusy = false;
\r
243 function __ontoggle(){
\r
244 //if( toggleBusy ) return;
\r
245 toggleOpen = !toggleOpen;
\r
250 <meta name="viewport" content="width=device-width,initial-scale=1">
\r
253 <body onload="__load()" onresize="__resize()" scroll="no"><div id="log">-- console.log() --</div><iframe src="index.html" width="500" height="100%" scrolling="yes" frameborder="0" allowtransparency="no"></iframe><div id="toggle" onclick="__ontoggle();"></div></body>
\r
255 <xmp class="cleanup-target" style="display:none"><plaintext style="display:none"><!-- plainetext は nds 用 -->