├── .gitignore ├── README.md ├── about.htm ├── about_kmc.htm ├── b-link.html ├── barner.htm ├── bower.json ├── cgi-bin └── bbs │ ├── .gitignore │ ├── bbs.cgi │ ├── cgi-lib.pl │ └── jcode.pl ├── css ├── diary.css ├── index.css └── webcrap.css ├── diary.htm ├── file ├── bg.mid ├── bg.mp3 ├── bg.wav └── jis.ttf ├── img ├── KMC-banner-88x31.gif ├── KMC-banner.gif ├── KMClogo_mini.png ├── camphor.gif ├── kado │ ├── s_table_gray1.gif │ ├── s_table_gray2.gif │ ├── s_table_gray3.gif │ └── s_table_gray4.gif ├── konami_mode.gif ├── kouji.png ├── nicc-banner.gif ├── peke.png └── welcome_kmc.png ├── index.htm ├── index2.htm ├── js ├── about_kmc.js ├── audio.js ├── mouse.js ├── webclap.js ├── welcome.js └── window-close.js ├── kmcdo.htm ├── links.htm ├── mar-quee.html ├── sidebar.htm ├── test.htm ├── top.htm └── webclap.htm /.gitignore: -------------------------------------------------------------------------------- 1 | /bower_components -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 2015AprilFool 2 | 懐古するぞ 3 | 4 | 愛生会的な感じでとりあえずKMCを紹介するようなサイトを作っていく方向でいきたいと思います 5 | 6 | とりあえず空っぽいhtmlおいたのでどんどんプルリクしてください 7 | 8 | conflictはまあ空気読むかなんとかするので気にしなくてもよいです。 9 | 10 | ## URL 11 | 12 | https://www.kmc.gr.jp/2015April/ 13 | 14 | ## install dependencies 15 | 16 | ``` 17 | bower install 18 | ``` 19 | -------------------------------------------------------------------------------- /about.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kmc-jp/2015AprilFool/15b1a93b598b92f31ec88c88b3cc1de21b11de9a/about.htm -------------------------------------------------------------------------------- /about_kmc.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kmc-jp/2015AprilFool/15b1a93b598b92f31ec88c88b3cc1de21b11de9a/about_kmc.htm -------------------------------------------------------------------------------- /b-link.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 27 | 28 | -------------------------------------------------------------------------------- /barner.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kmc-jp/2015AprilFool/15b1a93b598b92f31ec88c88b3cc1de21b11de9a/barner.htm -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "2015AprilFool", 3 | "version": "0.0.0", 4 | "homepage": "https://github.com/kmc-jp/2015AprilFool", 5 | "authors": [ 6 | "tyage " 7 | ], 8 | "license": "MIT", 9 | "ignore": [ 10 | "**/.*", 11 | "node_modules", 12 | "bower_components", 13 | "test", 14 | "tests" 15 | ], 16 | "dependencies": { 17 | "polymer": "Polymer/polymer#^0.5" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /cgi-bin/bbs/.gitignore: -------------------------------------------------------------------------------- 1 | data.txt 2 | -------------------------------------------------------------------------------- /cgi-bin/bbs/bbs.cgi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kmc-jp/2015AprilFool/15b1a93b598b92f31ec88c88b3cc1de21b11de9a/cgi-bin/bbs/bbs.cgi -------------------------------------------------------------------------------- /cgi-bin/bbs/cgi-lib.pl: -------------------------------------------------------------------------------- 1 | # Perl Routines to Manipulate CGI input 2 | # cgi-lib@pobox.com 3 | # $Id: cgi-lib.pl,v 2.17 1998/05/14 22:39:23 brenner Exp $ 4 | # 5 | # Copyright (c) 1993-1998 Steven E. Brenner 6 | # Unpublished work. 7 | # Permission granted to use and modify this library so long as the 8 | # copyright above is maintained, modifications are documented, and 9 | # credit is given for any use of the library. 10 | # 11 | # Thanks are due to many people for reporting bugs and suggestions 12 | 13 | # For more information, see: 14 | # http://cgi-lib.stanford.edu/cgi-lib/ 15 | 16 | $cgi_lib'version = sprintf("%d.%02d", q$Revision: 2.17 $ =~ /(\d+)\.(\d+)/); 17 | 18 | 19 | # Parameters affecting cgi-lib behavior 20 | # User-configurable parameters affecting file upload. 21 | $cgi_lib'maxdata = 131072; # maximum bytes to accept via POST - 2^17 22 | $cgi_lib'writefiles = 0; # directory to which to write files, or 23 | # 0 if files should not be written 24 | $cgi_lib'filepre = "cgi-lib"; # Prefix of file names, in directory above 25 | 26 | # Do not change the following parameters unless you have special reasons 27 | $cgi_lib'bufsize = 8192; # default buffer size when reading multipart 28 | $cgi_lib'maxbound = 100; # maximum boundary length to be encounterd 29 | $cgi_lib'headerout = 0; # indicates whether the header has been printed 30 | 31 | 32 | # ReadParse 33 | # Reads in GET or POST data, converts it to unescaped text, and puts 34 | # key/value pairs in %in, using "\0" to separate multiple selections 35 | 36 | # Returns >0 if there was input, 0 if there was no input 37 | # undef indicates some failure. 38 | 39 | # Now that cgi scripts can be put in the normal file space, it is useful 40 | # to combine both the form and the script in one place. If no parameters 41 | # are given (i.e., ReadParse returns FALSE), then a form could be output. 42 | 43 | # If a reference to a hash is given, then the data will be stored in that 44 | # hash, but the data from $in and @in will become inaccessable. 45 | # If a variable-glob (e.g., *cgi_input) is the first parameter to ReadParse, 46 | # information is stored there, rather than in $in, @in, and %in. 47 | # Second, third, and fourth parameters fill associative arrays analagous to 48 | # %in with data relevant to file uploads. 49 | 50 | # If no method is given, the script will process both command-line arguments 51 | # of the form: name=value and any text that is in $ENV{'QUERY_STRING'} 52 | # This is intended to aid debugging and may be changed in future releases 53 | 54 | sub ReadParse { 55 | local (*in) = shift if @_; # CGI input 56 | local (*incfn, # Client's filename (may not be provided) 57 | *inct, # Client's content-type (may not be provided) 58 | *insfn) = @_; # Server's filename (for spooled files) 59 | local ($len, $type, $meth, $errflag, $cmdflag, $perlwarn, $got, $name); 60 | 61 | # Disable warnings as this code deliberately uses local and environment 62 | # variables which are preset to undef (i.e., not explicitly initialized) 63 | $perlwarn = $^W; 64 | $^W = 0; 65 | 66 | binmode(STDIN); # we need these for DOS-based systems 67 | binmode(STDOUT); # and they shouldn't hurt anything else 68 | binmode(STDERR); 69 | 70 | # Get several useful env variables 71 | $type = $ENV{'CONTENT_TYPE'}; 72 | $len = $ENV{'CONTENT_LENGTH'}; 73 | $meth = $ENV{'REQUEST_METHOD'}; 74 | 75 | if ($len > $cgi_lib'maxdata) { #' 76 | &CgiDie("cgi-lib.pl: Request to receive too much data: $len bytes\n"); 77 | } 78 | 79 | if (!defined $meth || $meth eq '' || $meth eq 'GET' || 80 | $meth eq 'HEAD' || 81 | $type eq 'application/x-www-form-urlencoded') { 82 | local ($key, $val, $i); 83 | 84 | # Read in text 85 | if (!defined $meth || $meth eq '') { 86 | $in = $ENV{'QUERY_STRING'}; 87 | $cmdflag = 1; # also use command-line options 88 | } elsif($meth eq 'GET' || $meth eq 'HEAD') { 89 | $in = $ENV{'QUERY_STRING'}; 90 | } elsif ($meth eq 'POST') { 91 | if (($got = read(STDIN, $in, $len) != $len)) 92 | {$errflag="Short Read: wanted $len, got $got\n";}; 93 | } else { 94 | &CgiDie("cgi-lib.pl: Unknown request method: $meth\n"); 95 | } 96 | 97 | @in = split(/[&;]/,$in); 98 | push(@in, @ARGV) if $cmdflag; # add command-line parameters 99 | 100 | foreach $i (0 .. $#in) { 101 | # Convert plus to space 102 | $in[$i] =~ s/\+/ /g; 103 | 104 | # Split into key and value. 105 | ($key, $val) = split(/=/,$in[$i],2); # splits on the first =. 106 | 107 | # Convert %XX from hex numbers to alphanumeric 108 | $key =~ s/%([A-Fa-f0-9]{2})/pack("c",hex($1))/ge; 109 | $val =~ s/%([A-Fa-f0-9]{2})/pack("c",hex($1))/ge; 110 | 111 | # Associate key and value 112 | $in{$key} .= "\0" if (defined($in{$key})); # \0 is the multiple separator 113 | $in{$key} .= $val; 114 | } 115 | 116 | } elsif ($ENV{'CONTENT_TYPE'} =~ m#^multipart/form-data#) { 117 | # for efficiency, compile multipart code only if needed 118 | $errflag = !(eval <<'END_MULTIPART'); 119 | 120 | local ($buf, $boundary, $head, @heads, $cd, $ct, $fname, $ctype, $blen); 121 | local ($bpos, $lpos, $left, $amt, $fn, $ser); 122 | local ($bufsize, $maxbound, $writefiles) = 123 | ($cgi_lib'bufsize, $cgi_lib'maxbound, $cgi_lib'writefiles); 124 | 125 | 126 | # The following lines exist solely to eliminate spurious warning messages 127 | $buf = ''; 128 | 129 | ($boundary) = $type =~ /boundary="([^"]+)"/; #"; # find boundary 130 | ($boundary) = $type =~ /boundary=(\S+)/ unless $boundary; 131 | &CgiDie ("Boundary not provided: probably a bug in your server") 132 | unless $boundary; 133 | $boundary = "--" . $boundary; 134 | $blen = length ($boundary); 135 | 136 | if ($ENV{'REQUEST_METHOD'} ne 'POST') { 137 | &CgiDie("Invalid request method for multipart/form-data: $meth\n"); 138 | } 139 | 140 | if ($writefiles) { 141 | local($me); 142 | stat ($writefiles); 143 | $writefiles = "/tmp" unless -d _ && -w _; 144 | # ($me) = $0 =~ m#([^/]*)$#; 145 | $writefiles .= "/$cgi_lib'filepre"; 146 | } 147 | 148 | # read in the data and split into parts: 149 | # put headers in @in and data in %in 150 | # General algorithm: 151 | # There are two dividers: the border and the '\r\n\r\n' between 152 | # header and body. Iterate between searching for these 153 | # Retain a buffer of size(bufsize+maxbound); the latter part is 154 | # to ensure that dividers don't get lost by wrapping between two bufs 155 | # Look for a divider in the current batch. If not found, then 156 | # save all of bufsize, move the maxbound extra buffer to the front of 157 | # the buffer, and read in a new bufsize bytes. If a divider is found, 158 | # save everything up to the divider. Then empty the buffer of everything 159 | # up to the end of the divider. Refill buffer to bufsize+maxbound 160 | # Note slightly odd organization. Code before BODY: really goes with 161 | # code following HEAD:, but is put first to 'pre-fill' buffers. BODY: 162 | # is placed before HEAD: because we first need to discard any 'preface,' 163 | # which would be analagous to a body without a preceeding head. 164 | 165 | $left = $len; 166 | PART: # find each part of the multi-part while reading data 167 | while (1) { 168 | die $@ if $errflag; 169 | 170 | $amt = ($left > $bufsize+$maxbound-length($buf) 171 | ? $bufsize+$maxbound-length($buf): $left); 172 | $errflag = (($got = read(STDIN, $buf, $amt, length($buf))) != $amt); 173 | die "Short Read: wanted $amt, got $got\n" if $errflag; 174 | $left -= $amt; 175 | 176 | $in{$name} .= "\0" if defined $in{$name}; 177 | $in{$name} .= $fn if $fn; 178 | 179 | $name=~/([-\w]+)/; # This allows $insfn{$name} to be untainted 180 | if (defined $1) { 181 | $insfn{$1} .= "\0" if defined $insfn{$1}; 182 | $insfn{$1} .= $fn if $fn; 183 | } 184 | 185 | BODY: 186 | while (($bpos = index($buf, $boundary)) == -1) { 187 | if ($left == 0 && $buf eq '') { 188 | foreach $value (values %insfn) { 189 | unlink(split("\0",$value)); 190 | } 191 | &CgiDie("cgi-lib.pl: reached end of input while seeking boundary " . 192 | "of multipart. Format of CGI input is wrong.\n"); 193 | } 194 | die $@ if $errflag; 195 | if ($name) { # if no $name, then it's the prologue -- discard 196 | if ($fn) { print FILE substr($buf, 0, $bufsize); } 197 | else { $in{$name} .= substr($buf, 0, $bufsize); } 198 | } 199 | $buf = substr($buf, $bufsize); 200 | $amt = ($left > $bufsize ? $bufsize : $left); #$maxbound==length($buf); 201 | $errflag = (($got = read(STDIN, $buf, $amt, length($buf))) != $amt); 202 | die "Short Read: wanted $amt, got $got\n" if $errflag; 203 | $left -= $amt; 204 | } 205 | if (defined $name) { # if no $name, then it's the prologue -- discard 206 | if ($fn) { print FILE substr($buf, 0, $bpos-2); } 207 | else { $in {$name} .= substr($buf, 0, $bpos-2); } # kill last \r\n 208 | } 209 | close (FILE); 210 | last PART if substr($buf, $bpos + $blen, 2) eq "--"; 211 | substr($buf, 0, $bpos+$blen+2) = ''; 212 | $amt = ($left > $bufsize+$maxbound-length($buf) 213 | ? $bufsize+$maxbound-length($buf) : $left); 214 | $errflag = (($got = read(STDIN, $buf, $amt, length($buf))) != $amt); 215 | die "Short Read: wanted $amt, got $got\n" if $errflag; 216 | $left -= $amt; 217 | 218 | 219 | undef $head; undef $fn; 220 | HEAD: 221 | while (($lpos = index($buf, "\r\n\r\n")) == -1) { 222 | if ($left == 0 && $buf eq '') { 223 | foreach $value (values %insfn) { 224 | unlink(split("\0",$value)); 225 | } 226 | &CgiDie("cgi-lib: reached end of input while seeking end of " . 227 | "headers. Format of CGI input is wrong.\n$buf"); 228 | } 229 | die $@ if $errflag; 230 | $head .= substr($buf, 0, $bufsize); 231 | $buf = substr($buf, $bufsize); 232 | $amt = ($left > $bufsize ? $bufsize : $left); #$maxbound==length($buf); 233 | $errflag = (($got = read(STDIN, $buf, $amt, length($buf))) != $amt); 234 | die "Short Read: wanted $amt, got $got\n" if $errflag; 235 | $left -= $amt; 236 | } 237 | $head .= substr($buf, 0, $lpos+2); 238 | push (@in, $head); 239 | @heads = split("\r\n", $head); 240 | ($cd) = grep (/^\s*Content-Disposition:/i, @heads); 241 | ($ct) = grep (/^\s*Content-Type:/i, @heads); 242 | 243 | ($name) = $cd =~ /\bname="([^"]+)"/i; #"; 244 | ($name) = $cd =~ /\bname=([^\s:;]+)/i unless defined $name; 245 | 246 | ($fname) = $cd =~ /\bfilename="([^"]*)"/i; #"; # filename can be null-str 247 | ($fname) = $cd =~ /\bfilename=([^\s:;]+)/i unless defined $fname; 248 | $incfn{$name} .= (defined $in{$name} ? "\0" : "") . 249 | (defined $fname ? $fname : ""); 250 | 251 | ($ctype) = $ct =~ /^\s*Content-type:\s*"([^"]+)"/i; #"; 252 | ($ctype) = $ct =~ /^\s*Content-Type:\s*([^\s:;]+)/i unless defined $ctype; 253 | $inct{$name} .= (defined $in{$name} ? "\0" : "") . $ctype; 254 | 255 | if ($writefiles && defined $fname) { 256 | $ser++; 257 | $fn = $writefiles . ".$$.$ser"; 258 | open (FILE, ">$fn") || &CgiDie("Couldn't open $fn\n"); 259 | binmode (FILE); # write files accurately 260 | } 261 | substr($buf, 0, $lpos+4) = ''; 262 | undef $fname; 263 | undef $ctype; 264 | } 265 | 266 | 1; 267 | END_MULTIPART 268 | if ($errflag) { 269 | local ($errmsg, $value); 270 | $errmsg = $@ || $errflag; 271 | foreach $value (values %insfn) { 272 | unlink(split("\0",$value)); 273 | } 274 | &CgiDie($errmsg); 275 | } else { 276 | # everything's ok. 277 | } 278 | } else { 279 | &CgiDie("cgi-lib.pl: Unknown Content-type: $ENV{'CONTENT_TYPE'}\n"); 280 | } 281 | 282 | # no-ops to avoid warnings 283 | $insfn = $insfn; 284 | $incfn = $incfn; 285 | $inct = $inct; 286 | 287 | $^W = $perlwarn; 288 | 289 | return ($errflag ? undef : scalar(@in)); 290 | } 291 | 292 | 293 | # PrintHeader 294 | # Returns the magic line which tells WWW that we're an HTML document 295 | 296 | sub PrintHeader { 297 | return "Content-type: text/html\n\n"; 298 | } 299 | 300 | 301 | # HtmlTop 302 | # Returns the of a document and the beginning of the body 303 | # with the title and a body

header as specified by the parameter 304 | 305 | sub HtmlTop 306 | { 307 | local ($title) = @_; 308 | 309 | return < 311 | 312 | $title 313 | 314 | 315 |

$title

316 | END_OF_TEXT 317 | } 318 | 319 | 320 | # HtmlBot 321 | # Returns the , codes for the bottom of every HTML page 322 | 323 | sub HtmlBot 324 | { 325 | return "\n\n"; 326 | } 327 | 328 | 329 | # SplitParam 330 | # Splits a multi-valued parameter into a list of the constituent parameters 331 | 332 | sub SplitParam 333 | { 334 | local ($param) = @_; 335 | local (@params) = split ("\0", $param); 336 | return (wantarray ? @params : $params[0]); 337 | } 338 | 339 | 340 | # MethGet 341 | # Return true if this cgi call was using the GET request, false otherwise 342 | 343 | sub MethGet { 344 | return (defined $ENV{'REQUEST_METHOD'} && $ENV{'REQUEST_METHOD'} eq "GET"); 345 | } 346 | 347 | 348 | # MethPost 349 | # Return true if this cgi call was using the POST request, false otherwise 350 | 351 | sub MethPost { 352 | return (defined $ENV{'REQUEST_METHOD'} && $ENV{'REQUEST_METHOD'} eq "POST"); 353 | } 354 | 355 | 356 | # MyBaseUrl 357 | # Returns the base URL to the script (i.e., no extra path or query string) 358 | sub MyBaseUrl { 359 | local ($ret, $perlwarn); 360 | $perlwarn = $^W; $^W = 0; 361 | $ret = 'http://' . $ENV{'SERVER_NAME'} . 362 | ($ENV{'SERVER_PORT'} != 80 ? ":$ENV{'SERVER_PORT'}" : '') . 363 | $ENV{'SCRIPT_NAME'}; 364 | $^W = $perlwarn; 365 | return $ret; 366 | } 367 | 368 | 369 | # MyFullUrl 370 | # Returns the full URL to the script (i.e., with extra path or query string) 371 | sub MyFullUrl { 372 | local ($ret, $perlwarn); 373 | $perlwarn = $^W; $^W = 0; 374 | $ret = 'http://' . $ENV{'SERVER_NAME'} . 375 | ($ENV{'SERVER_PORT'} != 80 ? ":$ENV{'SERVER_PORT'}" : '') . 376 | $ENV{'SCRIPT_NAME'} . $ENV{'PATH_INFO'} . 377 | (length ($ENV{'QUERY_STRING'}) ? "?$ENV{'QUERY_STRING'}" : ''); 378 | $^W = $perlwarn; 379 | return $ret; 380 | } 381 | 382 | 383 | # MyURL 384 | # Returns the base URL to the script (i.e., no extra path or query string) 385 | # This is obsolete and will be removed in later versions 386 | sub MyURL { 387 | return &MyBaseUrl; 388 | } 389 | 390 | 391 | # CgiError 392 | # Prints out an error message which which containes appropriate headers, 393 | # markup, etcetera. 394 | # Parameters: 395 | # If no parameters, gives a generic error message 396 | # Otherwise, the first parameter will be the title and the rest will 397 | # be given as different paragraphs of the body 398 | 399 | sub CgiError { 400 | local (@msg) = @_; 401 | local ($i,$name); 402 | 403 | if (!@msg) { 404 | $name = &MyFullUrl; 405 | @msg = ("Error: script $name encountered fatal error\n"); 406 | }; 407 | 408 | if (!$cgi_lib'headerout) { #') 409 | print &PrintHeader; 410 | print "\n\n$msg[0]\n\n\n"; 411 | } 412 | print "

$msg[0]

\n"; 413 | foreach $i (1 .. $#msg) { 414 | print "

$msg[$i]

\n"; 415 | } 416 | 417 | $cgi_lib'headerout++; 418 | } 419 | 420 | 421 | # CgiDie 422 | # Identical to CgiError, but also quits with the passed error message. 423 | 424 | sub CgiDie { 425 | local (@msg) = @_; 426 | &CgiError (@msg); 427 | die @msg; 428 | } 429 | 430 | 431 | # PrintVariables 432 | # Nicely formats variables. Three calling options: 433 | # A non-null associative array - prints the items in that array 434 | # A type-glob - prints the items in the associated assoc array 435 | # nothing - defaults to use %in 436 | # Typical use: &PrintVariables() 437 | 438 | sub PrintVariables { 439 | local (*in) = @_ if @_ == 1; 440 | local (%in) = @_ if @_ > 1; 441 | local ($out, $key, $output); 442 | 443 | $output = "\n
\n"; 444 | foreach $key (sort keys(%in)) { 445 | foreach (split("\0", $in{$key})) { 446 | ($out = $_) =~ s/\n/
\n/g; 447 | $output .= "
$key\n
:$out:
\n"; 448 | } 449 | } 450 | $output .= "
\n"; 451 | 452 | return $output; 453 | } 454 | 455 | # PrintEnv 456 | # Nicely formats all environment variables and returns HTML string 457 | sub PrintEnv { 458 | &PrintVariables(*ENV); 459 | } 460 | 461 | 462 | # The following lines exist only to avoid warning messages 463 | $cgi_lib'writefiles = $cgi_lib'writefiles; 464 | $cgi_lib'bufsize = $cgi_lib'bufsize ; 465 | $cgi_lib'maxbound = $cgi_lib'maxbound; 466 | $cgi_lib'version = $cgi_lib'version; 467 | $cgi_lib'filepre = $cgi_lib'filepre; 468 | 469 | 1; #return true 470 | 471 | -------------------------------------------------------------------------------- /cgi-bin/bbs/jcode.pl: -------------------------------------------------------------------------------- 1 | package jcode; 2 | ;###################################################################### 3 | ;# 4 | ;# jcode.pl: Perl library for Japanese character code conversion 5 | ;# 6 | ;# Copyright (c) 1995-2000 Kazumasa Utashiro 7 | ;# Internet Initiative Japan Inc. 8 | ;# 3-13 Kanda Nishiki-cho, Chiyoda-ku, Tokyo 101-0054, Japan 9 | ;# 10 | ;# Copyright (c) 1992,1993,1994 Kazumasa Utashiro 11 | ;# Software Research Associates, Inc. 12 | ;# 13 | ;# Use and redistribution for ANY PURPOSE are granted as long as all 14 | ;# copyright notices are retained. Redistribution with modification 15 | ;# is allowed provided that you make your modified version obviously 16 | ;# distinguishable from the original one. THIS SOFTWARE IS PROVIDED 17 | ;# BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES ARE 18 | ;# DISCLAIMED. 19 | ;# 20 | ;# Original version was developed under the name of srekcah@sra.co.jp 21 | ;# February 1992 and it was called kconv.pl at the beginning. This 22 | ;# address was a pen name for group of individuals and it is no longer 23 | ;# valid. 24 | ;# 25 | ;# The latest version is available here: 26 | ;# 27 | ;# ftp://ftp.iij.ad.jp/pub/IIJ/dist/utashiro/perl/ 28 | ;# 29 | ;; $rcsid = q$Id: jcode.pl,v 2.13 2000/09/29 16:10:05 utashiro Exp $; 30 | ;# 31 | ;###################################################################### 32 | ;# 33 | ;# PERL4 INTERFACE: 34 | ;# 35 | ;# &jcode'getcode(*line) 36 | ;# Return 'jis', 'sjis', 'euc' or undef according to 37 | ;# Japanese character code in $line. Return 'binary' if 38 | ;# the data has non-character code. 39 | ;# 40 | ;# When evaluated in array context, it returns a list 41 | ;# contains two items. First value is the number of 42 | ;# characters which matched to the expected code, and 43 | ;# second value is the code name. It is useful if and 44 | ;# only if the number is not 0 and the code is undef; 45 | ;# that case means it couldn't tell 'euc' or 'sjis' 46 | ;# because the evaluation score was exactly same. This 47 | ;# interface is too tricky, though. 48 | ;# 49 | ;# Code detection between euc and sjis is very difficult 50 | ;# or sometimes impossible or even lead to wrong result 51 | ;# when it includes JIS X0201 KANA characters. So JIS 52 | ;# X0201 KANA is ignored for automatic code detection. 53 | ;# 54 | ;# &jcode'convert(*line, $ocode [, $icode [, $option]]) 55 | ;# Convert the contents of $line to the specified 56 | ;# Japanese code given in the second argument $ocode. 57 | ;# $ocode can be any of "jis", "sjis" or "euc", or use 58 | ;# "noconv" when you don't want the code conversion. 59 | ;# Input code is recognized automatically from the line 60 | ;# itself when $icode is not supplied (JIS X0201 KANA is 61 | ;# ignored in code detection. See the above descripton 62 | ;# of &getcode). $icode also can be specified, but 63 | ;# xxx2yyy routine is more efficient when both codes are 64 | ;# known. 65 | ;# 66 | ;# It returns the code of input string in scalar context, 67 | ;# and a list of pointer of convert subroutine and the 68 | ;# input code in array context. 69 | ;# 70 | ;# Japanese character code JIS X0201, X0208, X0212 and 71 | ;# ASCII code are supported. X0212 characters can not be 72 | ;# represented in SJIS and they will be replased by 73 | ;# "geta" character when converted to SJIS. 74 | ;# 75 | ;# See next paragraph for $option parameter. 76 | ;# 77 | ;# &jcode'xxx2yyy(*line [, $option]) 78 | ;# Convert the Japanese code from xxx to yyy. String xxx 79 | ;# and yyy are any convination from "jis", "euc" or 80 | ;# "sjis". They return *approximate* number of converted 81 | ;# bytes. So return value 0 means the line was not 82 | ;# converted at all. 83 | ;# 84 | ;# Optional parameter $option is used to specify optional 85 | ;# conversion method. String "z" is for JIS X0201 KANA 86 | ;# to X0208 KANA, and "h" is for reverse. 87 | ;# 88 | ;# $jcode'convf{'xxx', 'yyy'} 89 | ;# The value of this associative array is pointer to the 90 | ;# subroutine jcode'xxx2yyy(). 91 | ;# 92 | ;# &jcode'to($ocode, $line [, $icode [, $option]]) 93 | ;# &jcode'jis($line [, $icode [, $option]]) 94 | ;# &jcode'euc($line [, $icode [, $option]]) 95 | ;# &jcode'sjis($line [, $icode [, $option]]) 96 | ;# These functions are prepared for easy use of 97 | ;# call/return-by-value interface. You can use these 98 | ;# funcitons in s///e operation or any other place for 99 | ;# convenience. 100 | ;# 101 | ;# &jcode'jis_inout($in, $out) 102 | ;# Set or inquire JIS start and end sequences. Default 103 | ;# is "ESC-$-B" and "ESC-(-B". If you supplied only one 104 | ;# character, "ESC-$" or "ESC-(" is prepended for each 105 | ;# character respectively. Acutually "ESC-(-B" is not a 106 | ;# sequence to end JIS code but a sequence to start ASCII 107 | ;# code set. So `in' and `out' are somewhat misleading. 108 | ;# 109 | ;# &jcode'get_inout($string) 110 | ;# Get JIS start and end sequences from $string. 111 | ;# 112 | ;# &jcode'cache() 113 | ;# &jcode'nocache() 114 | ;# &jcode'flush() 115 | ;# Usually, converted character is cached in memory to 116 | ;# avoid same calculations have to be done many times. 117 | ;# To disable this caching, call &jcode'nocache(). It 118 | ;# can be revived by &jcode'cache() and cache is flushed 119 | ;# by calling &jcode'flush(). &cache() and &nocache() 120 | ;# functions return previous caching state. 121 | ;# 122 | ;# --------------------------------------------------------------- 123 | ;# 124 | ;# &jcode'h2z_xxx(*line) 125 | ;# JIS X0201 KANA (so-called Hankaku-KANA) to X0208 KANA 126 | ;# (Zenkaku-KANA) code conversion routine. String xxx is 127 | ;# any of "jis", "sjis" and "euc". From the difficulty 128 | ;# of recognizing code set from 1-byte KATAKANA string, 129 | ;# automatic code recognition is not supported. 130 | ;# 131 | ;# &jcode'z2h_xxx(*line) 132 | ;# X0208 to X0201 KANA code conversion routine. String 133 | ;# xxx is any of "jis", "sjis" and "euc". 134 | ;# 135 | ;# $jcode'z2hf{'xxx'} 136 | ;# $jcode'h2zf{'xxx'} 137 | ;# These are pointer to the corresponding function just 138 | ;# as $jcode'convf. 139 | ;# 140 | ;# --------------------------------------------------------------- 141 | ;# 142 | ;# &jcode'tr(*line, $from, $to [, $option]) 143 | ;# &jcode'tr emulates tr operator for 2 byte code. Only 'd' 144 | ;# is interpreted as an option. 145 | ;# 146 | ;# Range operator like `A-Z' for 2 byte code is partially 147 | ;# supported. Code must be JIS or EUC, and first byte 148 | ;# have to be same on first and last character. 149 | ;# 150 | ;# CAUTION: Handling range operator is a kind of trick 151 | ;# and it is not perfect. So if you need to transfer `-' 152 | ;# character, please be sure to put it at the beginning 153 | ;# or the end of $from and $to strings. 154 | ;# 155 | ;# &jcode'trans($line, $from, $to [, $option) 156 | ;# Same as &jcode'tr but accept string and return string 157 | ;# after translation. 158 | ;# 159 | ;# --------------------------------------------------------------- 160 | ;# 161 | ;# &jcode'init() 162 | ;# Initialize the variables used in this package. You 163 | ;# don't have to call this when using jocde.pl by `do' or 164 | ;# `require' interface. Call it first if you embedded 165 | ;# the jcode.pl at the end of your script. 166 | ;# 167 | ;###################################################################### 168 | ;# 169 | ;# PERL5 INTERFACE: 170 | ;# 171 | ;# Current jcode.pl is written in Perl 4 but it is possible to use 172 | ;# from Perl 5 using `references'. Fully perl5 capable version is 173 | ;# future issue. 174 | ;# 175 | ;# Since lexical variable is not a subject of typeglob, *string style 176 | ;# call doesn't work if the variable is declared as `my'. Same thing 177 | ;# happens to special variable $_ if the perl is compiled to use 178 | ;# thread capability. So using reference is generally recommented to 179 | ;# avoid the mysterious error. 180 | ;# 181 | ;# jcode::getcode(\$line) 182 | ;# jcode::convert(\$line, $ocode [, $icode [, $option]]) 183 | ;# jcode::xxx2yyy(\$line [, $option]) 184 | ;# &{$jcode::convf{'xxx', 'yyy'}}(\$line) 185 | ;# jcode::to($ocode, $line [, $icode [, $option]]) 186 | ;# jcode::jis($line [, $icode [, $option]]) 187 | ;# jcode::euc($line [, $icode [, $option]]) 188 | ;# jcode::sjis($line [, $icode [, $option]]) 189 | ;# jcode::jis_inout($in, $out) 190 | ;# jcode::get_inout($string) 191 | ;# jcode::cache() 192 | ;# jcode::nocache() 193 | ;# jcode::flush() 194 | ;# jcode::h2z_xxx(\$line) 195 | ;# jcode::z2h_xxx(\$line) 196 | ;# &{$jcode::z2hf{'xxx'}}(\$line) 197 | ;# &{$jcode::h2zf{'xxx'}}(\$line) 198 | ;# jcode::tr(\$line, $from, $to [, $option]) 199 | ;# jcode::trans($line, $from, $to [, $option) 200 | ;# jcode::init() 201 | ;# 202 | ;###################################################################### 203 | ;# 204 | ;# SAMPLES 205 | ;# 206 | ;# Convert any Kanji code to JIS and print each line with code name. 207 | ;# 208 | ;# while (defined($s = <>)) { 209 | ;# $code = &jcode'convert(*s, 'jis'); 210 | ;# print $code, "\t", $s; 211 | ;# } 212 | ;# 213 | ;# Convert all lines to JIS according to the first recognized line. 214 | ;# 215 | ;# while (defined($s = <>)) { 216 | ;# print, next unless $s =~ /[\033\200-\377]/; 217 | ;# (*f, $icode) = &jcode'convert(*s, 'jis'); 218 | ;# print; 219 | ;# defined(&f) || next; 220 | ;# while (<>) { &f(*s); print; } 221 | ;# last; 222 | ;# } 223 | ;# 224 | ;# The safest way of JIS conversion. 225 | ;# 226 | ;# while (defined($s = <>)) { 227 | ;# ($matched, $icode) = &jcode'getcode(*s); 228 | ;# if (@buf == 0 && $matched == 0) { 229 | ;# print $s; 230 | ;# next; 231 | ;# } 232 | ;# push(@buf, $s); 233 | ;# next unless $icode; 234 | ;# while (defined($s = shift(@buf))) { 235 | ;# &jcode'convert(*s, 'jis', $icode); 236 | ;# print $s; 237 | ;# } 238 | ;# while (defined($s = <>)) { 239 | ;# &jcode'convert(*s, 'jis', $icode); 240 | ;# print $s; 241 | ;# } 242 | ;# last; 243 | ;# } 244 | ;# print @buf if @buf; 245 | ;# 246 | ;###################################################################### 247 | 248 | ;# 249 | ;# Call initialize function if it is not called yet. This may sound 250 | ;# strange but it makes easy to embed the jcode.pl at the end of 251 | ;# script. Call &jcode'init at the beginning of the script in that 252 | ;# case. 253 | ;# 254 | &init unless defined $version; 255 | 256 | ;# 257 | ;# Initialize variables. 258 | ;# 259 | sub init { 260 | $version = $rcsid =~ /,v ([\d.]+)/ ? $1 : 'unknown'; 261 | 262 | $re_bin = '[\000-\006\177\377]'; 263 | 264 | $re_jis0208_1978 = '\e\$\@'; 265 | $re_jis0208_1983 = '\e\$B'; 266 | $re_jis0208_1990 = '\e&\@\e\$B'; 267 | $re_jis0208 = "$re_jis0208_1978|$re_jis0208_1983|$re_jis0208_1990"; 268 | $re_jis0212 = '\e\$\(D'; 269 | $re_jp = "$re_jis0208|$re_jis0212"; 270 | $re_asc = '\e\([BJ]'; 271 | $re_kana = '\e\(I'; 272 | 273 | $esc_0208 = "\e\$B"; 274 | $esc_0212 = "\e\$(D"; 275 | $esc_asc = "\e(B"; 276 | $esc_kana = "\e(I"; 277 | 278 | $re_sjis_c = '[\201-\237\340-\374][\100-\176\200-\374]'; 279 | $re_sjis_kana = '[\241-\337]'; 280 | 281 | $re_euc_c = '[\241-\376][\241-\376]'; 282 | $re_euc_kana = '\216[\241-\337]'; 283 | $re_euc_0212 = '\217[\241-\376][\241-\376]'; 284 | 285 | # Use `geta' for undefined character code 286 | $undef_sjis = "\x81\xac"; 287 | 288 | $cache = 1; 289 | 290 | # X0201 -> X0208 KANA conversion table. Looks weird? Not that 291 | # much. This is simply JIS text without escape sequences. 292 | ($h2z_high = $h2z = <<'__TABLE_END__') =~ tr/\041-\176/\241-\376/; 293 | ! !# $ !" % !& " !V # !W 294 | ^ !+ _ !, 0 !< 295 | ' %! ( %# ) %% * %' + %) 296 | , %c - %e . %g / %C 297 | 1 %" 2 %$ 3 %& 4 %( 5 %* 298 | 6 %+ 7 %- 8 %/ 9 %1 : %3 299 | 6^ %, 7^ %. 8^ %0 9^ %2 :^ %4 300 | ; %5 < %7 = %9 > %; ? %= 301 | ;^ %6 <^ %8 =^ %: >^ %< ?^ %> 302 | @ %? A %A B %D C %F D %H 303 | @^ %@ A^ %B B^ %E C^ %G D^ %I 304 | E %J F %K G %L H %M I %N 305 | J %O K %R L %U M %X N %[ 306 | J^ %P K^ %S L^ %V M^ %Y N^ %\ 307 | J_ %Q K_ %T L_ %W M_ %Z N_ %] 308 | O %^ P %_ Q %` R %a S %b 309 | T %d U %f V %h 310 | W %i X %j Y %k Z %l [ %m 311 | \ %o ] %s & %r 3^ %t 312 | __TABLE_END__ 313 | %h2z = split(/\s+/, $h2z . $h2z_high); 314 | %z2h = reverse %h2z; 315 | 316 | $convf{'jis' , 'jis' } = *jis2jis; 317 | $convf{'jis' , 'sjis'} = *jis2sjis; 318 | $convf{'jis' , 'euc' } = *jis2euc; 319 | $convf{'euc' , 'jis' } = *euc2jis; 320 | $convf{'euc' , 'sjis'} = *euc2sjis; 321 | $convf{'euc' , 'euc' } = *euc2euc; 322 | $convf{'sjis' , 'jis' } = *sjis2jis; 323 | $convf{'sjis' , 'sjis'} = *sjis2sjis; 324 | $convf{'sjis' , 'euc' } = *sjis2euc; 325 | $h2zf{'jis' } = *h2z_jis; 326 | $z2hf{'jis' } = *z2h_jis; 327 | $h2zf{'euc' } = *h2z_euc; 328 | $z2hf{'euc' } = *z2h_euc; 329 | $h2zf{'sjis'} = *h2z_sjis; 330 | $z2hf{'sjis'} = *z2h_sjis; 331 | } 332 | 333 | ;# 334 | ;# Set escape sequences which should be put before and after Japanese 335 | ;# (JIS X0208) string. 336 | ;# 337 | sub jis_inout { 338 | $esc_0208 = shift || $esc_0208; 339 | $esc_0208 = "\e\$$esc_0208" if length($esc_0208) == 1; 340 | $esc_asc = shift || $esc_asc; 341 | $esc_asc = "\e\($esc_asc" if length($esc_asc) == 1; 342 | ($esc_0208, $esc_asc); 343 | } 344 | 345 | ;# 346 | ;# Get JIS in and out sequences from the string. 347 | ;# 348 | sub get_inout { 349 | local($esc_0208, $esc_asc); 350 | $_[$[] =~ /($re_jis0208)/o && ($esc_0208 = $1); 351 | $_[$[] =~ /($re_asc)/o && ($esc_asc = $1); 352 | ($esc_0208, $esc_asc); 353 | } 354 | 355 | ;# 356 | ;# Recognize character code. 357 | ;# 358 | sub getcode { 359 | local(*s) = @_; 360 | local($matched, $code); 361 | 362 | if ($s !~ /[\e\200-\377]/) { # not Japanese 363 | $matched = 0; 364 | $code = undef; 365 | } # 'jis' 366 | elsif ($s =~ /$re_jp|$re_asc|$re_kana/o) { 367 | $matched = 1; 368 | $code = 'jis'; 369 | } 370 | elsif ($s =~ /$re_bin/o) { # 'binary' 371 | $matched = 0; 372 | $code = 'binary'; 373 | } 374 | else { # should be 'euc' or 'sjis' 375 | local($sjis, $euc) = (0, 0); 376 | 377 | while ($s =~ /(($re_sjis_c)+)/go) { 378 | $sjis += length($1); 379 | } 380 | while ($s =~ /(($re_euc_c|$re_euc_kana|$re_euc_0212)+)/go) { 381 | $euc += length($1); 382 | } 383 | $matched = &max($sjis, $euc); 384 | $code = ('euc', undef, 'sjis')[($sjis<=>$euc) + $[ + 1]; 385 | } 386 | wantarray ? ($matched, $code) : $code; 387 | } 388 | sub max { $_[ $[ + ($_[ $[ ] < $_[ $[ + 1 ]) ]; } 389 | 390 | ;# 391 | ;# Convert any code to specified code. 392 | ;# 393 | sub convert { 394 | local(*s, $ocode, $icode, $opt) = @_; 395 | return (undef, undef) unless $icode = $icode || &getcode(*s); 396 | return (undef, $icode) if $icode eq 'binary'; 397 | $ocode = 'jis' unless $ocode; 398 | $ocode = $icode if $ocode eq 'noconv'; 399 | local(*f) = $convf{$icode, $ocode}; 400 | &f(*s, $opt); 401 | wantarray ? (*f, $icode) : $icode; 402 | } 403 | 404 | ;# 405 | ;# Easy return-by-value interfaces. 406 | ;# 407 | sub jis { &to('jis', @_); } 408 | sub euc { &to('euc', @_); } 409 | sub sjis { &to('sjis', @_); } 410 | sub to { 411 | local($ocode, $s, $icode, $opt) = @_; 412 | &convert(*s, $ocode, $icode, $opt); 413 | $s; 414 | } 415 | sub what { 416 | local($s) = @_; 417 | &getcode(*s); 418 | } 419 | sub trans { 420 | local($s) = shift; 421 | &tr(*s, @_); 422 | $s; 423 | } 424 | 425 | ;# 426 | ;# SJIS to JIS 427 | ;# 428 | sub sjis2jis { 429 | local(*s, $opt, $n) = @_; 430 | &sjis2sjis(*s, $opt) if $opt; 431 | $s =~ s/(($re_sjis_c|$re_sjis_kana)+)/&_sjis2jis($1) . $esc_asc/geo; 432 | $n; 433 | } 434 | sub _sjis2jis { 435 | local($s) = shift; 436 | $s =~ s/(($re_sjis_c)+|($re_sjis_kana)+)/&__sjis2jis($1)/geo; 437 | $s; 438 | } 439 | sub __sjis2jis { 440 | local($s) = shift; 441 | if ($s =~ /^$re_sjis_kana/o) { 442 | $n += $s =~ tr/\241-\337/\041-\137/; 443 | $esc_kana . $s; 444 | } else { 445 | $n += $s =~ s/($re_sjis_c)/$s2e{$1}||&s2e($1)/geo; 446 | $s =~ tr/\241-\376/\041-\176/; 447 | $esc_0208 . $s; 448 | } 449 | } 450 | 451 | ;# 452 | ;# EUC to JIS 453 | ;# 454 | sub euc2jis { 455 | local(*s, $opt, $n) = @_; 456 | &euc2euc(*s, $opt) if $opt; 457 | $s =~ s/(($re_euc_c|$re_euc_kana|$re_euc_0212)+)/ 458 | &_euc2jis($1) . $esc_asc 459 | /geo; 460 | $n; 461 | } 462 | sub _euc2jis { 463 | local($s) = shift; 464 | $s =~ s/(($re_euc_c)+|($re_euc_kana)+|($re_euc_0212)+)/&__euc2jis($1)/geo; 465 | $s; 466 | } 467 | sub __euc2jis { 468 | local($s) = shift; 469 | local($esc); 470 | 471 | if ($s =~ tr/\216//d) { 472 | $esc = $esc_kana; 473 | } elsif ($s =~ tr/\217//d) { 474 | $esc = $esc_0212; 475 | } else { 476 | $esc = $esc_0208; 477 | } 478 | 479 | $n += $s =~ tr/\241-\376/\041-\176/; 480 | $esc . $s; 481 | } 482 | 483 | ;# 484 | ;# JIS to EUC 485 | ;# 486 | sub jis2euc { 487 | local(*s, $opt, $n) = @_; 488 | $s =~ s/($re_jp|$re_asc|$re_kana)([^\e]*)/&_jis2euc($1,$2)/geo; 489 | &euc2euc(*s, $opt) if $opt; 490 | $n; 491 | } 492 | sub _jis2euc { 493 | local($esc, $s) = @_; 494 | if ($esc !~ /^$re_asc/o) { 495 | $n += $s =~ tr/\041-\176/\241-\376/; 496 | if ($esc =~ /^$re_kana/o) { 497 | $s =~ s/([\241-\337])/\216$1/g; 498 | } 499 | elsif ($esc =~ /^$re_jis0212/o) { 500 | $s =~ s/([\241-\376][\241-\376])/\217$1/g; 501 | } 502 | } 503 | $s; 504 | } 505 | 506 | ;# 507 | ;# JIS to SJIS 508 | ;# 509 | sub jis2sjis { 510 | local(*s, $opt, $n) = @_; 511 | &jis2jis(*s, $opt) if $opt; 512 | $s =~ s/($re_jp|$re_asc|$re_kana)([^\e]*)/&_jis2sjis($1,$2)/geo; 513 | $n; 514 | } 515 | sub _jis2sjis { 516 | local($esc, $s) = @_; 517 | if ($esc =~ /^$re_jis0212/o) { 518 | $s =~ s/../$undef_sjis/g; 519 | $n = length; 520 | } 521 | elsif ($esc !~ /^$re_asc/o) { 522 | $n += $s =~ tr/\041-\176/\241-\376/; 523 | if ($esc =~ /^$re_jp/o) { 524 | $s =~ s/($re_euc_c)/$e2s{$1}||&e2s($1)/geo; 525 | } 526 | } 527 | $s; 528 | } 529 | 530 | ;# 531 | ;# SJIS to EUC 532 | ;# 533 | sub sjis2euc { 534 | local(*s, $opt,$n) = @_; 535 | $n = $s =~ s/($re_sjis_c|$re_sjis_kana)/$s2e{$1}||&s2e($1)/geo; 536 | &euc2euc(*s, $opt) if $opt; 537 | $n; 538 | } 539 | sub s2e { 540 | local($c1, $c2, $code); 541 | ($c1, $c2) = unpack('CC', $code = shift); 542 | 543 | if (0xa1 <= $c1 && $c1 <= 0xdf) { 544 | $c2 = $c1; 545 | $c1 = 0x8e; 546 | } elsif (0x9f <= $c2) { 547 | $c1 = $c1 * 2 - ($c1 >= 0xe0 ? 0xe0 : 0x60); 548 | $c2 += 2; 549 | } else { 550 | $c1 = $c1 * 2 - ($c1 >= 0xe0 ? 0xe1 : 0x61); 551 | $c2 += 0x60 + ($c2 < 0x7f); 552 | } 553 | if ($cache) { 554 | $s2e{$code} = pack('CC', $c1, $c2); 555 | } else { 556 | pack('CC', $c1, $c2); 557 | } 558 | } 559 | 560 | ;# 561 | ;# EUC to SJIS 562 | ;# 563 | sub euc2sjis { 564 | local(*s, $opt,$n) = @_; 565 | &euc2euc(*s, $opt) if $opt; 566 | $n = $s =~ s/($re_euc_c|$re_euc_kana|$re_euc_0212)/$e2s{$1}||&e2s($1)/geo; 567 | } 568 | sub e2s { 569 | local($c1, $c2, $code); 570 | ($c1, $c2) = unpack('CC', $code = shift); 571 | 572 | if ($c1 == 0x8e) { # SS2 573 | return substr($code, 1, 1); 574 | } elsif ($c1 == 0x8f) { # SS3 575 | return $undef_sjis; 576 | } elsif ($c1 % 2) { 577 | $c1 = ($c1>>1) + ($c1 < 0xdf ? 0x31 : 0x71); 578 | $c2 -= 0x60 + ($c2 < 0xe0); 579 | } else { 580 | $c1 = ($c1>>1) + ($c1 < 0xdf ? 0x30 : 0x70); 581 | $c2 -= 2; 582 | } 583 | if ($cache) { 584 | $e2s{$code} = pack('CC', $c1, $c2); 585 | } else { 586 | pack('CC', $c1, $c2); 587 | } 588 | } 589 | 590 | ;# 591 | ;# JIS to JIS, SJIS to SJIS, EUC to EUC 592 | ;# 593 | sub jis2jis { 594 | local(*s, $opt) = @_; 595 | $s =~ s/$re_jis0208/$esc_0208/go; 596 | $s =~ s/$re_asc/$esc_asc/go; 597 | &h2z_jis(*s) if $opt =~ /z/; 598 | &z2h_jis(*s) if $opt =~ /h/; 599 | } 600 | sub sjis2sjis { 601 | local(*s, $opt) = @_; 602 | &h2z_sjis(*s) if $opt =~ /z/; 603 | &z2h_sjis(*s) if $opt =~ /h/; 604 | } 605 | sub euc2euc { 606 | local(*s, $opt) = @_; 607 | &h2z_euc(*s) if $opt =~ /z/; 608 | &z2h_euc(*s) if $opt =~ /h/; 609 | } 610 | 611 | ;# 612 | ;# Cache control functions 613 | ;# 614 | sub cache { 615 | ($cache, $cache = 1)[$[]; 616 | } 617 | sub nocache { 618 | ($cache, $cache = 0)[$[]; 619 | } 620 | sub flushcache { 621 | undef %e2s; 622 | undef %s2e; 623 | } 624 | 625 | ;# 626 | ;# X0201 -> X0208 KANA conversion routine 627 | ;# 628 | sub h2z_jis { 629 | local(*s, $n) = @_; 630 | if ($s =~ s/$re_kana([^\e]*)/$esc_0208 . &_h2z_jis($1)/geo) { 631 | 1 while $s =~ s/(($re_jis0208)[^\e]*)($re_jis0208)/$1/o; 632 | } 633 | $n; 634 | } 635 | sub _h2z_jis { 636 | local($s) = @_; 637 | $n += $s =~ s/(([\041-\137])([\136\137])?)/ 638 | $h2z{$1} || $h2z{$2} . $h2z{$3} 639 | /ge; 640 | $s; 641 | } 642 | 643 | sub h2z_euc { 644 | local(*s) = @_; 645 | $s =~ s/\216([\241-\337])(\216([\336\337]))?/ 646 | $h2z{"$1$3"} || $h2z{$1} . $h2z{$3} 647 | /ge; 648 | } 649 | 650 | sub h2z_sjis { 651 | local(*s, $n) = @_; 652 | $s =~ s/(($re_sjis_c)+)|(([\241-\337])([\336\337])?)/ 653 | $1 || ($n++, $h2z{$3} ? $e2s{$h2z{$3}} || &e2s($h2z{$3}) 654 | : &e2s($h2z{$4}) . ($5 && &e2s($h2z{$5}))) 655 | /geo; 656 | $n; 657 | } 658 | 659 | ;# 660 | ;# X0208 -> X0201 KANA conversion routine 661 | ;# 662 | sub z2h_jis { 663 | local(*s, $n) = @_; 664 | $s =~ s/($re_jis0208)([^\e]+)/&_z2h_jis($2)/geo; 665 | $n; 666 | } 667 | sub _z2h_jis { 668 | local($s) = @_; 669 | $s =~ s/((\%[!-~]|![\#\"&VW+,<])+|([^!%][!-~]|![^\#\"&VW+,<])+)/ 670 | &__z2h_jis($1) 671 | /ge; 672 | $s; 673 | } 674 | sub __z2h_jis { 675 | local($s) = @_; 676 | return $esc_0208 . $s unless $s =~ /^%/ || $s =~ /^![\#\"&VW+,<]/; 677 | $n += length($s) / 2; 678 | $s =~ s/(..)/$z2h{$1}/g; 679 | $esc_kana . $s; 680 | } 681 | 682 | sub z2h_euc { 683 | local(*s, $n) = @_; 684 | &init_z2h_euc unless defined %z2h_euc; 685 | $s =~ s/($re_euc_c|$re_euc_kana)/ 686 | $z2h_euc{$1} ? ($n++, $z2h_euc{$1}) : $1 687 | /geo; 688 | $n; 689 | } 690 | 691 | sub z2h_sjis { 692 | local(*s, $n) = @_; 693 | &init_z2h_sjis unless defined %z2h_sjis; 694 | $s =~ s/($re_sjis_c)/$z2h_sjis{$1} ? ($n++, $z2h_sjis{$1}) : $1/geo; 695 | $n; 696 | } 697 | 698 | ;# 699 | ;# Initializing JIS X0208 to X0201 KANA table for EUC and SJIS. This 700 | ;# can be done in &init but it's not worth doing. Similarly, 701 | ;# precalculated table is not worth to occupy the file space and 702 | ;# reduce the readability. The author personnaly discourages to use 703 | ;# X0201 Kana character in the any situation. 704 | ;# 705 | sub init_z2h_euc { 706 | local($k, $s); 707 | while (($k, $s) = each %z2h) { 708 | $s =~ s/([\241-\337])/\216$1/g && ($z2h_euc{$k} = $s); 709 | } 710 | } 711 | sub init_z2h_sjis { 712 | local($s, $v); 713 | while (($s, $v) = each %z2h) { 714 | $s =~ /[\200-\377]/ && ($z2h_sjis{&e2s($s)} = $v); 715 | } 716 | } 717 | 718 | ;# 719 | ;# TR function for 2-byte code 720 | ;# 721 | sub tr { 722 | # $prev_from, $prev_to, %table are persistent variables 723 | local(*s, $from, $to, $opt) = @_; 724 | local(@from, @to); 725 | local($jis, $n) = (0, 0); 726 | 727 | $jis++, &jis2euc(*s) if $s =~ /$re_jp|$re_asc|$re_kana/o; 728 | $jis++ if $to =~ /$re_jp|$re_asc|$re_kana/o; 729 | 730 | if (!defined($prev_from) || $from ne $prev_from || $to ne $prev_to) { 731 | ($prev_from, $prev_to) = ($from, $to); 732 | undef %table; 733 | &_maketable; 734 | } 735 | 736 | $s =~ s/([\200-\377][\000-\377]|[\000-\377])/ 737 | defined($table{$1}) && ++$n ? $table{$1} : $1 738 | /ge; 739 | 740 | &euc2jis(*s) if $jis; 741 | 742 | $n; 743 | } 744 | 745 | sub _maketable { 746 | local($ascii) = '(\\\\[\\-\\\\]|[\0-\133\135-\177])'; 747 | 748 | &jis2euc(*to) if $to =~ /$re_jp|$re_asc|$re_kana/o; 749 | &jis2euc(*from) if $from =~ /$re_jp|$re_asc|$re_kana/o; 750 | 751 | grep(s/(([\200-\377])[\200-\377]-\2[\200-\377])/&_expnd2($1)/ge, 752 | $from, $to); 753 | grep(s/($ascii-$ascii)/&_expnd1($1)/geo, 754 | $from, $to); 755 | 756 | @to = $to =~ /[\200-\377][\000-\377]|[\000-\377]/g; 757 | @from = $from =~ /[\200-\377][\000-\377]|[\000-\377]/g; 758 | push(@to, ($opt =~ /d/ ? '' : $to[$#to]) x (@from - @to)) if @to < @from; 759 | @table{@from} = @to; 760 | } 761 | 762 | sub _expnd1 { 763 | local($s) = @_; 764 | $s =~ s/\\(.)/$1/g; 765 | local($c1, $c2) = unpack('CxC', $s); 766 | if ($c1 <= $c2) { 767 | for ($s = ''; $c1 <= $c2; $c1++) { 768 | $s .= pack('C', $c1); 769 | } 770 | } 771 | $s; 772 | } 773 | 774 | sub _expnd2 { 775 | local($s) = @_; 776 | local($c1, $c2, $c3, $c4) = unpack('CCxCC', $s); 777 | if ($c1 == $c3 && $c2 <= $c4) { 778 | for ($s = ''; $c2 <= $c4; $c2++) { 779 | $s .= pack('CC', $c1, $c2); 780 | } 781 | } 782 | $s; 783 | } 784 | 785 | 1; 786 | -------------------------------------------------------------------------------- /css/diary.css: -------------------------------------------------------------------------------- 1 | body{ 2 | background-color: #33ff00; 3 | } 4 | -------------------------------------------------------------------------------- /css/index.css: -------------------------------------------------------------------------------- 1 | body{ 2 | background-image: url(../img/KMClogo_mini.png); 3 | background-size: 160px; 4 | background-color: rgb(135, 206, 235); 5 | -moz-animation: background-animation 3s ease 0s infinite alternate; 6 | -webkit-animation: background-animation 3s ease 0s infinite alternate; 7 | -ms-animation: background-animation 3s ease 0s infinite alternate; 8 | } 9 | 10 | @-moz-keyframes background-animation { 11 | 0% { 12 | background-color: rgb(135, 206, 235); 13 | background-position: 0 0; 14 | } 15 | 50% { background-color: rgb(149, 235, 135); } 16 | 100% { 17 | background-color: rgb(175, 96, 135); 18 | background-position: 160px 102px; 19 | } 20 | } 21 | @-webkit-keyframes background-animation { 22 | 0% { 23 | background-color: rgb(135, 206, 235); 24 | background-position: 0 0; 25 | } 26 | 50% { background-color: rgb(149, 235, 135); } 27 | 100% { 28 | background-color: rgb(175, 96, 135); 29 | background-position: 160px 102px; 30 | } 31 | } 32 | @-ms-keyframes background-animation { 33 | 0% { 34 | background-color: rgb(135, 206, 235); 35 | background-position: 0 0; 36 | } 37 | 50% { background-color: rgb(149, 235, 135); } 38 | 100% { 39 | background-color: rgb(175, 96, 135); 40 | background-position: 160px 102px; 41 | } 42 | } 43 | 44 | #github img { 45 | z-index: 100; 46 | } 47 | 48 | #kmc_mouse { 49 | position: absolute; 50 | user-select: none 51 | } 52 | 53 | #history { 54 | border: 0 solid #000; 55 | margin: 0 0 0 0; 56 | width: 300px; 57 | background: #F7F7E7; 58 | } 59 | #history-title { 60 | -moz-animation: blink 0.7s steps(5, start) infinite; 61 | -webkit-animation: blink 0.7s steps(5, start) infinite; 62 | -ms-animation: blink 0.7s steps(5, start) infinite; 63 | margin: 0 0 0 0; 64 | border: 0; 65 | } 66 | @-moz-keyframes blink { 67 | to { 68 | visibility: hidden; 69 | } 70 | } 71 | @-webkit-keyframes blink { 72 | to { 73 | visibility: hidden; 74 | } 75 | } 76 | @-ms-keyframes blink { 77 | to { 78 | visibility: hidden; 79 | } 80 | } 81 | .history-new { 82 | color: red; 83 | background: yellow; 84 | margin: 0 5px 0 0; 85 | } 86 | .history-new:after { 87 | content: "new!"; 88 | font-weight: bold; 89 | -moz-animation: blink 0.7s steps(5, start) infinite; 90 | -webkit-animation: blink 0.7s steps(5, start) infinite; 91 | -ms-animation: blink 0.7s steps(5, start) infinite; 92 | } 93 | .banner { 94 | -moz-animation: blink 1.2s steps(5, start) infinite; 95 | -webkit-animation: blink 1.2s steps(5, start) infinite; 96 | -ms-animation: blink 1.2s steps(5, start) infinite; 97 | } 98 | 99 | #welcome-kmc { 100 | height: 309px; 101 | margin: 0 0 10px 0; 102 | } 103 | #welcome-kmc img { 104 | -moz-animation: logo-animation 1s ease 0s infinite alternate; 105 | -webkit-animation: logo-animation 1s ease 0s infinite alternate; 106 | -ms-animation: logo-animation 1s ease 0s infinite alternate; 107 | } 108 | @-moz-keyframes logo-animation { 109 | 0% { width: 756px; height: 189px; } 110 | 100% { width: 1056px; height: 309px; } 111 | } 112 | @-webkit-keyframes logo-animation { 113 | 0% { width: 756px; height: 189px; } 114 | 100% { width: 1056px; height: 309px; } 115 | } 116 | @-ms-keyframes logo-animation { 117 | 0% { width: 756px; height: 189px; } 118 | 100% { width: 1056px; height: 309px; } 119 | } 120 | 121 | @font-face { 122 | font-family: 'jis'; 123 | src: url('../file/jis.ttf') format('truetype'); 124 | } 125 | 126 | #jis-font { 127 | font-family: 'jis'; 128 | } 129 | -------------------------------------------------------------------------------- /css/webcrap.css: -------------------------------------------------------------------------------- 1 | h2 { 2 | -webkit-animation: spin 1.5s linear ; 3 | -moz-animation: spin 1.5s linear ; 4 | -ms-animation: spin 1.5s linear ; 5 | -o-animation: spin 1.5s linear ; 6 | animation: spin 1.5s linear ; 7 | } 8 | 9 | @-webkit-keyframes spin { 10 | 0% {-webkit-transform: rotate(0deg);} 11 | 100% {-webkit-transform: rotate(1800deg);} 12 | } 13 | @-moz-keyframes spin { 14 | 0% {-moz-transform: rotate(0deg);} 15 | 100% {-moz-transform: rotate(1800deg);} 16 | } 17 | @-ms-keyframes spin { 18 | 0% {-ms-transform: rotate(0deg);} 19 | 100% {-ms-transform: rotate(1800deg);} 20 | } 21 | @-o-keyframes spin { 22 | 0% {-o-transform: rotate(0deg);} 23 | 100% {-o-transform: rotate(1800deg);} 24 | } 25 | @keyframes spin { 26 | 0% {transform: rotate(0deg);} 27 | 100% {transform: rotate(1800deg);} 28 | } 29 | -------------------------------------------------------------------------------- /diary.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kmc-jp/2015AprilFool/15b1a93b598b92f31ec88c88b3cc1de21b11de9a/diary.htm -------------------------------------------------------------------------------- /file/bg.mid: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kmc-jp/2015AprilFool/15b1a93b598b92f31ec88c88b3cc1de21b11de9a/file/bg.mid -------------------------------------------------------------------------------- /file/bg.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kmc-jp/2015AprilFool/15b1a93b598b92f31ec88c88b3cc1de21b11de9a/file/bg.mp3 -------------------------------------------------------------------------------- /file/bg.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kmc-jp/2015AprilFool/15b1a93b598b92f31ec88c88b3cc1de21b11de9a/file/bg.wav -------------------------------------------------------------------------------- /file/jis.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kmc-jp/2015AprilFool/15b1a93b598b92f31ec88c88b3cc1de21b11de9a/file/jis.ttf -------------------------------------------------------------------------------- /img/KMC-banner-88x31.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kmc-jp/2015AprilFool/15b1a93b598b92f31ec88c88b3cc1de21b11de9a/img/KMC-banner-88x31.gif -------------------------------------------------------------------------------- /img/KMC-banner.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kmc-jp/2015AprilFool/15b1a93b598b92f31ec88c88b3cc1de21b11de9a/img/KMC-banner.gif -------------------------------------------------------------------------------- /img/KMClogo_mini.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kmc-jp/2015AprilFool/15b1a93b598b92f31ec88c88b3cc1de21b11de9a/img/KMClogo_mini.png -------------------------------------------------------------------------------- /img/camphor.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kmc-jp/2015AprilFool/15b1a93b598b92f31ec88c88b3cc1de21b11de9a/img/camphor.gif -------------------------------------------------------------------------------- /img/kado/s_table_gray1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kmc-jp/2015AprilFool/15b1a93b598b92f31ec88c88b3cc1de21b11de9a/img/kado/s_table_gray1.gif -------------------------------------------------------------------------------- /img/kado/s_table_gray2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kmc-jp/2015AprilFool/15b1a93b598b92f31ec88c88b3cc1de21b11de9a/img/kado/s_table_gray2.gif -------------------------------------------------------------------------------- /img/kado/s_table_gray3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kmc-jp/2015AprilFool/15b1a93b598b92f31ec88c88b3cc1de21b11de9a/img/kado/s_table_gray3.gif -------------------------------------------------------------------------------- /img/kado/s_table_gray4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kmc-jp/2015AprilFool/15b1a93b598b92f31ec88c88b3cc1de21b11de9a/img/kado/s_table_gray4.gif -------------------------------------------------------------------------------- /img/konami_mode.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kmc-jp/2015AprilFool/15b1a93b598b92f31ec88c88b3cc1de21b11de9a/img/konami_mode.gif -------------------------------------------------------------------------------- /img/kouji.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kmc-jp/2015AprilFool/15b1a93b598b92f31ec88c88b3cc1de21b11de9a/img/kouji.png -------------------------------------------------------------------------------- /img/nicc-banner.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kmc-jp/2015AprilFool/15b1a93b598b92f31ec88c88b3cc1de21b11de9a/img/nicc-banner.gif -------------------------------------------------------------------------------- /img/peke.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kmc-jp/2015AprilFool/15b1a93b598b92f31ec88c88b3cc1de21b11de9a/img/peke.png -------------------------------------------------------------------------------- /img/welcome_kmc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kmc-jp/2015AprilFool/15b1a93b598b92f31ec88c88b3cc1de21b11de9a/img/welcome_kmc.png -------------------------------------------------------------------------------- /index.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kmc-jp/2015AprilFool/15b1a93b598b92f31ec88c88b3cc1de21b11de9a/index.htm -------------------------------------------------------------------------------- /index2.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kmc-jp/2015AprilFool/15b1a93b598b92f31ec88c88b3cc1de21b11de9a/index2.htm -------------------------------------------------------------------------------- /js/about_kmc.js: -------------------------------------------------------------------------------- 1 | $(function(){ 2 | 3 | var marquee_attribute = ["width","behavior","behavior","behavior","behavior","direction","direction"]; 4 | var marquee_value = ["70%","scroll","alternate","alternate","slide","right","right"]; 5 | var rainbow = ["red","orange","gold","green","skyblue","blue","purple"]; 6 | 7 | 8 | $("marquee").each(function(){ 9 | var i = Math.floor( Math.random() * marquee_attribute.length ); 10 | $(this).attr(marquee_attribute[i],marquee_value[i]); 11 | i = Math.floor( Math.random() * marquee_attribute.length ); 12 | $(this).attr(marquee_attribute[i],marquee_value[i]); 13 | i = Math.floor( Math.random() * 70 ); 14 | $(this).attr("scrollamount", i); 15 | }) 16 | 17 | $('h1').children().addBack().contents().each(function() { 18 | $(this).replaceWith($(this).text().replace(/(\S)/g, '$1')); 19 | }) 20 | $('h2').children().addBack().contents().each(function() { 21 | $(this).replaceWith($(this).text().replace(/(\S)/g, '$1')); 22 | }) 23 | $('h3').children().addBack().contents().each(function() { 24 | $(this).replaceWith($(this).text().replace(/(\S)/g, '$1')); 25 | }) 26 | $('h4').children().addBack().contents().each(function() { 27 | $(this).replaceWith($(this).text().replace(/(\S)/g, '$1')); 28 | }) 29 | 30 | $("span").each(function(){ 31 | var i = Math.floor( Math.random() * rainbow.length ); 32 | $(this).css("color",rainbow[i]) 33 | }) 34 | 35 | }) 36 | -------------------------------------------------------------------------------- /js/audio.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kmc-jp/2015AprilFool/15b1a93b598b92f31ec88c88b3cc1de21b11de9a/js/audio.js -------------------------------------------------------------------------------- /js/mouse.js: -------------------------------------------------------------------------------- 1 | $(function(){ 2 | 3 | var clientX = 0; 4 | var clientY = 0; 5 | 6 | var picX = 0; 7 | var picY = 0; 8 | 9 | $(window).mousemove(function(e){ 10 | clientX = e.clientX; 11 | clientY = e.clientY; 12 | }); 13 | 14 | setInterval(function(){ 15 | picY = picY + (clientY + 10 - picY) / 30; 16 | picX = picX + (clientX + 10 - picX) / 30; 17 | $("#kmc_mouse").css({ 18 | top: picY , 19 | left: picX , 20 | }); 21 | },8); 22 | 23 | Mousetrap.bind('up up down down left right left right b a enter', function() { 24 | $("#kmc_mouse").attr("src", "./img/konami_mode.gif"); 25 | }); 26 | 27 | }); 28 | -------------------------------------------------------------------------------- /js/webclap.js: -------------------------------------------------------------------------------- 1 | var Webclap = React.createClass({ 2 | handleClick: function() { 3 | var option = 'width=420,height=230,resizable=no,scrollbars=no,status=no'; 4 | window.open('webclap.htm', null, option); 5 | }, 6 | render: function() { 7 | return ( 8 | 11 | ); 12 | } 13 | }); 14 | 15 | $(function() { 16 | $('.webclap').each(function() { 17 | React.render( 18 | , 19 | $(this).get(0) 20 | ); 21 | }); 22 | }); 23 | -------------------------------------------------------------------------------- /js/welcome.js: -------------------------------------------------------------------------------- 1 | console.log("\n\ 2 | __ __ _\n\ 3 | \\ \\ / /__| | ___ ___ _ __ ___ ___\n\ 4 | \\ \\ /\\ / / _ \\ |/ __/ _ \\| '_ ` _ \\ / _ \\\n\ 5 | \\ V V / __/ | (_| (_) | | | | | | __/\n\ 6 | \\_/\\_/ \\___|_|\\___\\___/|_| |_| |_|\\___|\n\ 7 | ") 8 | 9 | console.log("\n\ 10 | _ _ ____ __ ____\n\ 11 | | |_ ___ | |/ / \\/ |/ ___|\n\ 12 | | __/ _ \\ | ' /| |\\/| | |\n\ 13 | | || (_) | | . \\| | | | |___\n\ 14 | \\__\\___/ |_|\\_\\_| |_|\\____|\n\ 15 | ") 16 | -------------------------------------------------------------------------------- /js/window-close.js: -------------------------------------------------------------------------------- 1 | var WindowClose = React.createClass({ 2 | handleClick: function() { 3 | window.close(); 4 | }, 5 | render: function() { 6 | return ( 7 | 10 | ); 11 | } 12 | }); 13 | 14 | $(function() { 15 | $('.window-close').each(function() { 16 | React.render( 17 | , 18 | $(this).get(0) 19 | ); 20 | }); 21 | }); 22 | -------------------------------------------------------------------------------- /kmcdo.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kmc-jp/2015AprilFool/15b1a93b598b92f31ec88c88b3cc1de21b11de9a/kmcdo.htm -------------------------------------------------------------------------------- /links.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kmc-jp/2015AprilFool/15b1a93b598b92f31ec88c88b3cc1de21b11de9a/links.htm -------------------------------------------------------------------------------- /mar-quee.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /sidebar.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kmc-jp/2015AprilFool/15b1a93b598b92f31ec88c88b3cc1de21b11de9a/sidebar.htm -------------------------------------------------------------------------------- /test.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kmc-jp/2015AprilFool/15b1a93b598b92f31ec88c88b3cc1de21b11de9a/test.htm -------------------------------------------------------------------------------- /top.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kmc-jp/2015AprilFool/15b1a93b598b92f31ec88c88b3cc1de21b11de9a/top.htm -------------------------------------------------------------------------------- /webclap.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kmc-jp/2015AprilFool/15b1a93b598b92f31ec88c88b3cc1de21b11de9a/webclap.htm --------------------------------------------------------------------------------