9 var noscripts = document.getElementsByTagName('NOSCRIPT'),
\r
11 for(var i=0; i<noscripts.length; ++i){
\r
12 noscript = noscripts[i];
\r
13 noscript.parentNode && noscript.parentNode.removeChild( noscript);
\r
16 var location = document.location.pathname,
\r
17 isWorkPage = location.indexOf( '\/work.html') !== -1,
\r
18 deep = location.indexOf( '\/diary\/') !== -1 ||
\r
19 location.indexOf( '\/text\/') !== -1 ||
\r
20 location.indexOf( '\/help\/') !== -1 ||
\r
21 location.indexOf( '\/sitemap\/') !== -1 ||
\r
22 location.indexOf( '\/wiki\/') !== -1;
\r
24 var LoginUserConsole = isWorkPage === false ?
\r
26 var _body = document.body,
\r
27 _root = document.getElementsByTagName( 'HTML')[ 0],
\r
29 iframe, visible = false;
\r
32 filter = document.createElement( 'DIV');
\r
33 filter.style.position = 'absolute';
\r
34 filter.style.left = filter.style.top = '0px';
\r
35 filter.style.width = filter.style.height ='100%';
\r
36 filter.style.backgroundColor = '#fff';
\r
39 src = deep === true ? '../work.html' : 'work.html';
\r
41 var el = document.createElement(ua.isIE ? '<iframe name="' + id + '" src="' + src + '">' : 'iframe');
\r
42 el.id = el.name = id;
\r
43 el.setAttribute( 'name', id);
\r
45 el.style.position = 'absolute';
\r
46 el.style.left = el.style.top = '0px';
\r
47 el.style.width = el.style.height ='100%';
\r
48 el.style.overflow = 'hidden';
\r
49 el.hspace = el.vspace = el.marginheight = el.marginwidth = 0;
\r
51 _body.appendChild(el);
\r
56 var idoc;//WebKit > 521 corresponds with Safari 3, which started with 522 WebKit version.
\r
57 if (ua.isWebKit > 521) {
\r
58 idoc = el.contentWindow.document;
\r
59 } else if (ua.isSafari) {
\r
61 } else { // if(d.isMozilla){
\r
62 idoc = el.contentWindow;
\r
68 el.contentWindow.location.replace = src;
\r
71 //el.contentWindow.location = src;
\r
74 el.location = src; // for Safari 2.0.3 ??
\r
77 } else if( ua.isOpera){
\r
78 el.src = src; // for Opera
\r
79 el.contentWindow.location.replace = src; // for Opera
\r
81 //el.src = src; // for firefox
\r
82 idoc.location.replace(src);
\r
86 delete LoginUserConsole.init;
\r
89 if(visible === true) return;
\r
91 _root.style.overflow = 'hidden';
\r
93 _body.style.overflow = 'hidden';
\r
95 LoginUserConsole.init && LoginUserConsole.init();
\r
97 iframe.parentNode !== _body && _body.appendChild(iframe);
\r
99 _body.insertBefore(filter, iframe);
\r
104 if(visible === false) return;
\r
106 _body.removeChild(filter);
\r
107 _body.style.overflow = '';
\r
109 _root.style.overflow = '';
\r
111 _body.removeChild(iframe);
\r
120 h2c.view.show( h2c.editor);
\r
126 var ua = (function(){
\r
130 var dua = n.userAgent;
\r
131 var dav = n.appVersion;
\r
132 var tv = parseFloat(dav);
\r
133 acme.isOpera = (dua.indexOf("Opera") >= 0) ? tv: undefined;
\r
134 acme.isKhtml = (dav.indexOf("Konqueror") >= 0) ? tv : undefined;
\r
135 acme.isWebKit = parseFloat(dua.split("WebKit/")[1]) || undefined;
\r
136 acme.isChrome = parseFloat(dua.split("Chrome/")[1]) || undefined;
\r
137 var index = Math.max(dav.indexOf("WebKit"), dav.indexOf("Safari"), 0);
\r
138 if(index && !acme.isChrome){
\r
139 acme.isSafari = parseFloat(dav.split("Version/")[1]);
\r
140 if(!acme.isSafari || parseFloat(dav.substr(index + 7)) <= 419.3){
\r
144 if(document.all && !acme.isOpera){
\r
145 acme.isIE = parseFloat(dav.split("MSIE ")[1]) || undefined;
\r
151 var navi = document.getElementById('global-navi'),
\r
152 origin = document.createElement('A'),
\r
153 items = ['Home', 'Comic list', 'Picture', 'Setting'],
\r
156 for(var i=0; i<l; ++i){
\r
157 item = origin.cloneNode(true);
\r
158 item.innerHTML = items[i];
\r
160 item.onclick = LoginUserConsole.show;
\r
161 navi.appendChild(item);
\r
165 var _gaq = _gaq || [];
\r
166 _gaq.push(['_setAccount', 'UA-28023955-1']);
\r
167 _gaq.push(['_trackPageview']);
\r
170 var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
\r
171 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
\r
172 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
\r