미친, js_javascript 기술로 작성된 운영 체제가 있습니다
풀어 주다: 2016-05-16 19:14:43
http://www.masswerk.at/jsuix/
// JS/UIX v0.44
// (c) mass:werk (N.Landsteiner ) 2003
// 모든 권리 보유
//term gui
var conf_term_x=102;
var conf_term_y=34;
var conf_kbd_offset=34;
var termImgPath='jsuix_support/';
var termDiv='termDiv';
var termBgColor='#181818';
var termFrameColor='#555555';
var termPageColor='#222222';
var conf_repeat_delay1=320;
var conf_repeat_delay2=170;
var termKbdDiv='termKbdDiv';
var termKbdBgColor='#222222';
var keycapspath='jsuix_support/keycaps/';
var termSubDivs=false;
var termLayers=false;
var termDocNS4=null;
var termStringStart='';
var termStringEnd='';
var termKbdDocNS4=null;
var termKbdOn=false;
var keycapsShift=false;
var keycapsCpslk=false;
var keycapsShiftRef=new Array();
var keycapsCpslkRef=new Array();
var termSpecials=new Array();
termSpecials[0]=' ';
termSpecials[1]='$';
termSpecials[2]=' ';
termSpecials[3]='?';
termSpecials[4]='#';
termSpecials[32]=' ';
termSpecials[34]='"';
termSpecials[38]='&';
termSpecials[60]='termSpecials[62]='>';
termSpecials[127];
var termStyles=new Array(1,2,4,8)
var termStyleOpen=new Array() ();
';
termStyle[2]='termStyle[ 2]='
' termStyle[4]='
'; '' ;
termStyleClose[8]='';
// 버튼 UI
var termImgNames=new Array('left_lo', ' right_lo' ', 'right_hi', 'delete_lo', 'delete_hi', '미친, js_javascript 기술로 작성된 운영 체제가 있습니다_lo', '미친, js_javascript 기술로 작성된 운영 체제가 있습니다_hi', 'kbd_show_lo', 'kbd_hide_lo', 'kbd_hide_hi') var termImages=new Array(); >
function termImgPreload(path,imnamemes) { for (var i=0; i var n=imgnames[i]
termImages[n ]= new Image(); termImages[n].src=path n '.gif'
}
}
if (document.images) termImgPreload(termImgPath,termImgNames)
함수 termSetImg(n,v) {
if (document.images) { var img=(termLayers)? termDocNS4.images['term_' n]: document.images['term_' n];
var stat=(v)? '_안녕' : '_로';
img.src=termImages[n stat].src
}
}
// UI 키보드
// 키 맵 (200=왼쪽 Shift, 202=오른쪽 Shift, 204=CpsLock)
var termKeyMap=[
[96 ,49,50,51,52,53,54,55,56,57,48,45,61,8],
[27,113,119,101,114,116,121,117,105,111,112,91,93,13],
[204,97, 115,100,102,103,104,106,107,108,59 ,39,35],
[200,92,122,120,99,118,98,110,109,44,46,47,30,202],
[32,28,31,29]
];
var termKeyMapShift=[
[126,33,34,35,36,37,94,38,42,40,41,95,43,8],
[27,81,87, 69,82,84,89,85,73,79,80,123,125,13],
[204,65,83,68,70,71,72,74,75,76,58,34,64],
[200,124,90,88,67,86,66,78,77,60,62,63,30,202],
[32,28,31,29]
];
var termKeyMapCpslk=[
[96,49,50,51,52,53,54,55,56,57,48,45,61,8],
[27,81,87, 69,82,84,89,85,73,79,80,91,93,13],
[204,65,83,68,70,71,72,74,75,76,59,39 ,35],
[200,92,90,88,67,86,66,78,77,44,46,47,30,202],
[32,28,31,29]
];
var termKeyWdth=[
[35,35,35,35,35,35,35,35,35,35,35,35,35,69],
[55,35,35, 35,35,35,35,35,35,35,35,35,35,0],
[65,35,35,35,35,35,35,35,35,35,35,35 ,35],
[49,35,35,35,35,35,35,35,35,35,35,35,35,54],
[252,35,35,35]
];
var keycapsImgNames=new Array(200,201,202,203,204,205);
함수 termKeyCaps(k) {
if ((k=32) && (repeatTimer)) clearTimeout(repeatTimer);
if (k==204) {
keycapsCpslk=(!keycapsCpslk);
var cnr=(keycapsCpslk)? 205:204;
termKbdSetImg(204,cnr)
}
else if ((k==200) || (k==202)) {
keycapsShift=(!keycapsShift);
var m=(keycapsShift)? 1:0;
termKbdSetImg(200,200m);
termKbdSetImg(202,202m)
}
else {
var ch=0;
if (keycapsShift) {
ch=keycapsShiftRef[k]
keycapsShift=false;
termKbdSetImg(200,200);
termKbdSetImg(202,202)
}
else if (keycapsCpslk) ch=keycapsCpslkRef[k]
else ch=k;
keyHandler({which:ch,jsuix_remapped:true})
}
}
function termKbdSetImg(n,v) {
if(document.images) {
var img=(termLayers)? termKbdDocNS4.images['key' n] : document.images['key' n];
img.src=termImages[v].src
}
}
function termSetKbdButton(v) {
if(document.images) {
var img=(termLayers)? termDocNS4.images.term_kbd_show : document.images.term_kbd_show;
var n=(termKbdOn)? 'kbd_hide' : 'kbd_show';
var stat=(v)? '_hi' : '_lo'; img.src = termimages [n stat] .src
}
함수 termkbdshow () { if (termkbdon) {
setdivvisibility (termkbddiv, 0) ;
termKbdOn=false;
termSetKbdButton(0)
}
else {
termImgPreload(keycapspath,keycapsImgNames);
keycapsShift=false;
keycapsCpslk=false;
var s='n';
s ='
| n';
s ='' termMakeKbd() ' | n';
s ' |
n';
s ='
|
n';
s ='
n';
s ='
| n';
s ='' termMakeKbd() ' | n';
' |
N';
s ='
| n';
s ='';
writeElement(termKbdDiv,s);
setDivXY(termKbdDiv,conf_term_x,conf_term_y conf_kbd_offset conf_rows*conf_rowheigt);
if (termLayers) termKbdDocNS4=document.layers[termKbdDiv].document; termKbdOn=true;
setDivVisibility(termKbdDiv,1); termSetKbdButton(0) } } function termMakeKbd() { var s=' n'; for (var i=0; i s =''; for (var k=0; k var kc=termKeyMap[i][k]; keycapsShiftRef[kc]=termKeyMapShift[i][k]; keycapsCpslkRef[kc]=termKeyMapCpslk[i][k]; if (kc==13) { s ='
'; 계속 }; if (kc==32) s =' ' else if (kc==28) { s =''; s =''; 계속 } else if (kc==29) { s =''; 계속 } else if (kc==8) { s =''; 계속 } s =''; if (kc==35) s =''; }; s ='
|
n';
};
s ='
';
return s
}
// term UI
function termHide() {
if (repeatTimer) clearTimeout(repeatTimer);
if (termKbdOn) termKbdShow();
setDivVisibility(termDiv,0)
}
function makeTerm() {
window.status='터미널 구축...';
termLayers=(document.layers)? 참:거짓;
termSubDivs=(navigator.userAgent.indexOf('Gecko') var s='';
s ='n';
s ='
n'; var rstr=''; for (var c=0; c for (var r=0; r var id=((termLayers) || (termSubDivs))? '' : ' ID="term_' r '"'; s ='' rstr ' | n'; }; s ='
| n'; s =' |
n';
s ='n
s =' n' }; termDocNS4=document.layers[termDiv].document; termStringStart=''; termStringEnd=''; } else if (orderubdivs) { s = ' n'}; termStringStart=''; termStringEnd=''; }; writeElement(termDiv,s); setDivXY(termDiv,conf_term_x,conf_term_y); setDivVisibility(termDiv,1); window.status='' }
function termDisplay(r) { var s=termStringStart; var curStyle=0; for (var i=0; i var c=term[r][i]; var cs=termStyle[r][i]; if (cs!=curStyle) { if (curStyle) { for (var k=termStyles.length-1; k>=0; k--) { var st=termStyles [케이]; if (curStyle&st) s =termStyleClose[st]; } }; curStyle=cs; for (var k=0; k var st=termStyles[k]; if (curStyle&st) s =termStyleOpen[st]; } }; s = (termSpecials[c])? termSpecials[c] : String.fromCharCode(c); }; if (curStyle>0) { for (var k=termStyles.length-1; k>=0; k--) { var st=termStyles[k]; if (curStyle&st) s =termStyleClose[st]; } }; s =termStringEnd; writeElement('term_' r,s,termDocNS4) }
function termGuiReady() { ready=true; if (termGuiElementReady(termDiv, self.document)) { for (var r=0; r if (termGuiElementReady('term_' r,termDocNS4)==false) { 준비=false; 중단 } } } else ready=false; 반환 준비 }
함수 cursorKbdLeft() { keyHandler({which:28}) }
함수 cursorKbdRight() { keyHandler({which:29}) }
함수 termKbdBackspace() { keyHandler({which:8}) }
함수 termKbdEsc() { keyHandler({which:27}) }
함수 termKbdClear() { if ((!cnslLock) && (!cnslRawMode)) cnslReset(); }
// UI 버튼 반복
function repeatSet(cmd,on) { if (repeatTimer) clearTimeout(repeatTimer); repeatTimer=setTimeout('repeatDo("' cmd '")',conf_repeat_delay1); }
function repeatClear() { if (repeatTimer) clearTimeout(repeatTimer); }
function repeatDo(cmd) { if (repeatTimer) clearTimeout(repeatTimer); if (cmd=='left') cursorKbdLeft() else if (cmd=='right') cursorKbdRight() else if (cmd=='미친, js_javascript 기술로 작성된 운영 체제가 있습니다') termKbdBackspace(); repeatTimer=setTimeout('repeatDo("' cmd '")',conf_repeat_delay2); }
// 기본 동적
함수 writeElement(e,t,d) { if (document.layers) { var doc=( 디)? d: self.document; doc.layers[e].document.open(); doc.layers[e].document.write(t); doc.layers[e].document.close() } else if (document.getElementById) { var obj=document.getElementById(e); obj.innerHTML=t } else if (document.all) { document.all[e].innerHTML=t } }
함수 setDivXY(d,x,y) { if (document.layers) { document.layers[d].moveTo(x,y) } else if(document.getElementById) { var obj=document.getElementById(d); obj.style.left=x 'px'; obj.style.top=y 'px' } else if (document.all) { document.all[d].style.left=x 'px'; document.all[d].style.top=y 'px' } }
function setDivVisibility(d,v) { if (document.layers) { document.layers[d].visibility= (v)? '표시':'숨기기'; } else if (document.getElementById) { var obj=document.getElementById(d); obj.style.visibility= (v)? '표시':'숨김'; } else if (document.all) { document.all[d].style.visibility=(v)? '표시':'숨김'; } }
함수 termGuiElementReady(e,d) { if (document.layers) { var doc=(d)? d: self.document; 반품 ((doc) && (doc.layers[e]))? true:false } else if (document.getElementById) { 반환(document.getElementById(e))? true:false } else if (document.all) { return(document.all[e])? true:false } else return false }
//eof
|
|
|
본 웹사이트의 성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.
저자별 최신 기사
-
2024-10-22 09:46:29
-
2024-10-13 13:53:41
-
2024-10-12 12:15:51
-
2024-10-11 22:47:31
-
2024-10-11 19:36:51
-
2024-10-11 15:50:41
-
2024-10-11 15:07:41
-
2024-10-11 14:21:21
-
2024-10-11 12:59:11
-
2024-10-11 12:17:31