-
Notifications
You must be signed in to change notification settings - Fork 0
/
Quine_Clock_Digital.js
21 lines (21 loc) · 2.19 KB
/
Quine_Clock_Digital.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
a=["f=['012456','25','02346','02356','1235','01356','013456','0125','0123456','012356'];d=[' '.repeat(46",
"),' '.repeat(46),' '.repeat(46),' '.repeat(22)+'##'+' '.repeat(22),' '.repeat(46),' '.repeat(22)+'##'+'",
" '.repeat(22),' '.repeat(46),' '.repeat(46),' '.repeat(46),' Quine Clock Digital by Yukkku ",
" ',' '.repeat(46)];function t(x,n){if(f[n].indexOf('0')!==-1){d[1]=d[1].substr(0,x+2)+'####'+d[1].sub",
"str(x+6)};if(f[n].indexOf",/* */"('1')!==-1){d[2]=d[2].sub",
"str(0,x)+'##'+d[2].substr",/* #### #### #### #### */"(x+2);d[3]=d[3].substr(0,",
"x)+'##'+d[3].substr(x+2)}",/* ## ## ## ## ## ## ## ## */";if(f[n].indexOf('2')!==-",
"1){d[2]=d[2].substr(0,x+6",/* ## ## ## ## ## ## ## ## ## */")+'##'+d[2].substr(x+8);d",
"[3]=d[3].substr(0,x+6)+'#",/* #### #### #### #### */"#'+d[3].substr(x+8)};if(f",
"[n].indexOf('3')!==-1){d[",/* ## ## ## ## ## ## ## ## ## */"4]=d[4].substr(0,x+2)+'##",
"##'+ d[4].substr(x+6)};if",/* ## ## ## ## ## ## ## ## */"(f[n].indexOf('4')!==-1){",
"d[5]=d[5].substr(0,x)+'##",/* #### #### #### #### */"'+d[5].substr(x+2);d[6]=d",
"[6].substr(0,x)+'##'+d[6]",/* */".substr(x+2)};if(f[n].ind",
"exOf('5')!==-1){d[5]=d[5]",/* Quine Clock Digital by Yukkku */".substr(0,x+6)+'##'+d[5].",
"substr(x+8);d[6]=d[6].sub",/* */"str(0,x+6)+'##'+d[6].subs",
"tr(x+8)};if(f[n].indexOf('6')!==-1){d[7]=d[7].substr(0,x+2)+'####'+ d[7].substr(x+6)}};h=new Date().get",
"Hours();t(2,Math.floor(h/10));t(12,h%10);m=new Date().getMinutes();t(26,Math.floor(m/10));t(36,m%10);s=",
"'a=[';for(i=0;i<4;i++){s+='\"'+a[i].replace(/(\"|\\\\)/g,'\\\\$1')+'\",\\n'};for(i=0;i<11;i++){s+='\"'+",
"a[i*2+4].replace(/(\"|\\\\)/g,'\\\\$1')+'\",/*'+d[i]+'*/\"'+a[i*2+5].replace(/(\"|\\\\)/g,'\\\\$1')+'\"",
",\\n'};for(i=26;i<32;i++){s+='\"'+a[i].replace(/(\"|\\\\)/g,'\\\\$1')+'\",\\n'};console.log(s.slice(0,-",
"2)+'];eval(a.join(\\'\\'))')//--------------------------------------------------------"];eval(a.join(''))