亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? vietuni.js

?? java servlet著名論壇源代碼
?? JS
字號:
/*vietuni.js - V.1.618 - R.11.11.01 @QDJTGSLLA@P*Veni*Vidi*Vici*
* by Tran Anh Tuan [tuan@physik.hu-berlin.de]
* Copyright (c) 2001, 2002 AVYS e.V.. All Rights Reserved.
*
* Originally published and documented at http://www.avys.de/
* You may use this code without fee on noncommercial web sites.
* You may NOT alter the code and then call it another name and/or resell it.
* The copyright notice must remain intact on srcipts.
*/

// interface for HTML:
//

// Fix Safari bug, not sure the correct problem
var agt=navigator.userAgent.toLowerCase();
var supported = (document.all || document.getElementById) && (agt.indexOf('safari') == -1);
//var supported = (document.all || document.getElementById);

var disabled = false;
var charmapid = 1;
var keymodeid = 0;
var linebreak = 0;
var theTyper = null;

reset = function(){}
initTyper = telexingVietUC;

function setTypingMode(mode) {
  keymodeid = mode;
  if (theTyper) theTyper.keymode= initKeys();
  if (!supported && !disabled) {
    alert("Xin loi, trinh duyet web cua ban khong cho phep dung VietTyping.\n");
    disabled = true;
  }
}

initCharMap = function() { return new CVietUniCodeMap(); }

initKeys = function() {
  switch (keymodeid) {
    case 1: return new CTelexKeys();
    case 2: return new CVniKeys();
    case 3: return new CViqrKeys();
    case 4: return new CAllKeys();
    default: return new CVKOff();
  }
}

function telexingVietUC (txtarea) {
  txtarea.vietarea= true;
  txtarea.onkeyup= null;
  if (!supported) return;
  txtarea.onkeypress= vietTyping;
  txtarea.getCurrentWord= getCurrentWord;
  txtarea.replaceWord= replaceWord;
  txtarea.onkeydown= onKeyDown;
  txtarea.onmousedown= onMouseDown;
  if(!theTyper) theTyper = new CVietString("");
}

function getEvt(evt) {
  if (typeof(evt)=='string') return evt.charCodeAt(0);
  return document.all? event.keyCode: (evt && evt.which)? evt.which: 0;
}

function onKeyDown(evt) {
  var c= getEvt(evt);
  if ((c==10) || (c==13)) { reset(1); linebreak= 1; }
  else if ((c<49) && (c!=16) && (c!=20)) { linebreak= 0; reset(c==32); }
  return true;
}

function onMouseDown(evt) { reset(0); linebreak= 0; return true; }

function vietTyping(evt) {
  var c= getEvt(evt);
  theTyper.value= this.getCurrentWord();
  var changed= ((c>32) && theTyper.typing(c));
  if (changed) this.replaceWord(theTyper.value);
  return !changed;
}

function getCurrentWord() {
  if(!document.all) return this.value;
  var caret = this.document.selection.createRange();
  if (caret.text) return null;
  var backward = -10;
  do {
    var caret2 = caret.duplicate();
    caret2.moveStart("character", backward++);
  } while (caret2.parentElement() != this && backward <0);
  this.curword = caret2.duplicate();
  return caret2.text;
}

function replaceWord(newword) {
  if(!document.all) { this.value= newword; return; }
  this.curword.text = newword;
  this.curword.collapse(false);
}
// end interface


// "class": CVietString
//
function CVietString(str) {
  this.value= str;
  this.keymode= initKeys();
  this.charmap= initCharMap();
  this.ctrlchar= '-';
  this.changed= 0;

  this.typing= typing;
  this.Compose= Compose;
  this.Correct= Correct;
  this.findCharToChange= findCharToChange;
  return this;
}

function typing(ctrl) {
  this.changed = 0;
  this.ctrlchar = String.fromCharCode(ctrl);
  if (linebreak) linebreak= 0; else this.keymode.getAction(this);
  this.Correct();
  return this.changed;
}

function Compose(type) {
  if(!this.value) return;
  var info = this.findCharToChange(type);
  if (!info || !info[0]) return;
  var telex;
  if (info[0]=='\\') telex= [1,this.ctrlchar,1];
  else if (type>6) telex= this.charmap.getAEOWD(info[0], type, info[3]);
  else telex= this.charmap.getDau(info[0], type);
  if (!(this.changed = telex[0])) return;
  this.value = this.value.replaceAt(info[1],telex[1],info[2]);
  if (!telex[2]) { spellerror= 1; this.value+= this.ctrlchar; }
}

function Correct() {
  if (this.charmap.maxchrlen || !document.all) return 0;
  var tmp= this.value;
  if ('nNcC'.indexOf(this.ctrlchar)>=0) tmp+= this.ctrlchar;
  var er= /[^\x01-\x7f](hn|hc|gn)$/i.exec(tmp);
  if (er) {
    this.value= tmp.substring(0,tmp.length-2)+er[1].charAt(1)+er[1].charAt(0);
    this.changed= 1;
  }
  else if(!this.changed) return 0;
  er= /\w([^\x01-\x7f])(\w*)([^\x01-\x7f])\S*$/.exec(this.value);
  if (!er) return 0;
  var i= this.charmap.isVowel(er[1]);
  var ri= (i-1)%24 + 1, ci= (i-ri)/24;
  var i2= this.charmap.isVowel(er[3]);
  if (!ci || !i2) return 0;
  var ri2= (i2-1)%24 + 1, ci2= (i2-ri2)/24;
  var nc= this.charmap.charAt(ri)+ er[2]+ this.charmap.charAt(ci*24+ri2);
  this.value= this.value.replace(new RegExp(er[1]+er[2]+er[3],'g'), nc);
}

function findCharToChange(type) {
  var lastchars= this.charmap.lastCharsOf(this.value, 5);
  var i= 0, c=lastchars[0][0], chr=0;
  if (c=='\\') return [c,this.value.length-1,1];
  if (type==15) while (!(chr=this.charmap.isVD(c))) {
    if ((c < 'A') || (i>=4) || !(c=lastchars[++i][0])) return null;
  }
  else while( "cghmnptCGHMNPT".indexOf(c)>=0) {
    if ((c < 'A') || (i>=2) || !(c=lastchars[++i][0])) return null;
  }
  c = lastchars[0][0].toLowerCase();
  var pc = lastchars[1][0].toLowerCase();
  var ppc = lastchars[2][0].toLowerCase();
  if (i==0 && type!=15) {
    if ( (chr=this.charmap.isVowel(lastchars[1][0]))
      && ("uyoia".indexOf(c)>=0) && !this.charmap.isUO(pc,c)
      && !((pc=='o' && c=='a') || (pc=='u' && c=='y'))
      && !((ppc=='q' && pc=='u') || (ppc=='g' && pc=='i')) ) ++i;
    if (c=='a' && (type==9 || type==7)) i= 0;
  }
  c= lastchars[i][0];
  if ((i==0 || chr==0) && type!=15) chr= this.charmap.isVowel(c);
  if (!chr) return null;
  var clen= lastchars[i][1], isuo=0;
  if ((i>0) && (type==7 || type==8 || type==11)) {
    isuo=this.charmap.isUO(lastchars[i+1][0],c);
    if (isuo) { chr=isuo; clen+=lastchars[++i][1]; isuo=1; }
  }
  var pos= this.value.length;
  for (var j=0; j<= i; j++) pos -= lastchars[j][1];
  return [chr, pos, clen, isuo];
}
// end CVietString


// character-map template
//
function CVietCharMap(){
  this.vietchars = null;
  this.length = 149;
  this.chr_cache = new Array(20);
  this.ind_cache = new Array(20);
  this.cptr = 0;
  this.caching= function(chr, ind) {
    this.chr_cache[this.cptr] = chr;
    this.ind_cache[this.cptr++] = ind;
    this.cptr %= 20;
  }
  return this;
}

CVietCharMap.prototype.charAt= function(ind){
  var chrcode = this.vietchars[ind];
  return chrcode ? String.fromCharCode(chrcode) : null;
}

CVietCharMap.prototype.isVowel= function(chr){
  var i = 0;
  while ((i<20) && (chr != this.chr_cache[i])) ++i;
  if (i<20) return this.ind_cache[i];

  i = this.length-5;
  while ((chr != this.charAt(i)) && i) --i;
  this.caching(chr, i);
  return i;
}

CVietCharMap.prototype.isVD= function (chr){
  var ind = this.length-5;
  while ((chr != this.charAt(ind)) && (ind < this.length)) ++ind;
  return (ind<this.length)? ind: 0;
}

CVietCharMap.prototype.isUO= function (c1, c2){
  if (!c1 || !c2) return 0;
  var ind1 = this.isVowel(c1);
  var ci = (ind1-1)%12;
  if ((ci!=9) && (ci!=10)) return 0;
  var ind2 = this.isVowel(c2);
  ci = (ind2-1)%12;
  if ((ci!=6) && (ci!=7) && (ci!=8)) return 0;
  return [ind1,ind2];
}

CVietCharMap.prototype.getDau= function (ind, type){
  var accented= (ind < 25)? 0: 1;
  var ind_i= (ind-1) % 24 +1;
  var charset= (type == 6)? 0 : type;
  if ((type== 6) && !accented) return [0];
  var newind= charset*24 + ind_i;
  if (newind == ind) newind= ind_i;
  var chr= this.charAt(newind);
  if (!chr) chr= this.lowerCaseOf(0,newind);
  return [1, chr, newind>24 || type==6];
}

var map=[
[7,7,7,8,8, 8,9,10,11,15],
[0,3,6,0,6, 9,0, 3, 6, 0],
[1,4,7,2,8,10,1, 4, 7, 1]
];
CVietCharMap.prototype.getAEOWD= function(ind, type, isuo) {
  var c=0, i1=isuo? ind[0]: ind;
  var vc1= (type==15)? (i1-1)%2 : (i1-1)%12;
  if (isuo) {
    var base= ind[1]-(ind[1]-1)%12;
    if (type==7 || type==11) c= this.charAt(i1-vc1+9)+this.charAt(base+7);
    else if (type==8) c= this.charAt(i1-vc1+10)+this.charAt(base+8);
    return [c!=0, c, 1];
  }
  var i= -1, shift= 0, del= 0;
  while (shift==0 && ++i<map[0].length) {
    if (map[0][i]==type) {
      if(map[1][i]==vc1) shift= map[2][i]-vc1;
      else if(map[2][i]==vc1) shift= map[1][i]-vc1;
    }
  }
  if (shift==0) {
    if (type==7 && (vc1==2 || vc1==8)) shift=-1;
    else if ((type==9 && vc1==2) || (type==11 && vc1==8)) shift=-1;
    else if (type==8 && (vc1==1 || vc1==7)) shift=1;
    del= 1;
  } else del=(shift>0);
  i1 += shift;
  var chr= this.charAt(i1);
  if (i1<145) this.caching(chr, i1);
  if (!chr) chr= this.lowerCaseOf(0, i1);
  return [shift!=0, chr, del];
}

CVietCharMap.prototype.lastCharsOf= function(str, num){
  if (!num) return [str.charAt(str.length-1),1];
  var vchars = new Array(num);
  for (var i=0; i< num; i++) { vchars[i]= [str.charAt(str.length-i-1),1]; }
  return vchars;
}
// end CVietCharMap prototype


String.prototype.replaceAt= function(i,newchr,clen){
  return this.substring(0,i)+ newchr + this.substring(i+clen);
}

// output map: class CVietUniCodeMap
//
function CVietUniCodeMap(){ var map= new CVietCharMap();
map.vietchars = new Array(
"UNICODE",
97, 226, 259, 101, 234, 105, 111, 244, 417, 117, 432, 121,
65, 194, 258, 69, 202, 73, 79, 212, 416, 85, 431, 89,
225, 7845, 7855, 233, 7871, 237, 243, 7889, 7899, 250, 7913, 253,
193, 7844, 7854, 201, 7870, 205, 211, 7888, 7898, 218, 7912, 221,
224, 7847, 7857, 232, 7873, 236, 242, 7891, 7901, 249, 7915, 7923,
192, 7846, 7856, 200, 7872, 204, 210, 7890, 7900, 217, 7914, 7922,
7841, 7853, 7863, 7865, 7879, 7883, 7885, 7897, 7907, 7909, 7921, 7925,
7840, 7852, 7862, 7864, 7878, 7882, 7884, 7896, 7906, 7908, 7920, 7924,
7843, 7849, 7859, 7867, 7875, 7881, 7887, 7893, 7903, 7911, 7917, 7927,
7842, 7848, 7858, 7866, 7874, 7880, 7886, 7892, 7902, 7910, 7916, 7926,
227, 7851, 7861, 7869, 7877, 297, 245, 7895, 7905, 361, 7919, 7929,
195, 7850, 7860, 7868, 7876, 296, 213, 7894, 7904, 360, 7918, 7928,
100, 273, 68, 272);
return map;
}

// input methods: class C...Keys
function CVietKeys() {
  this.getAction= function(typer){
    var i= this.keys.indexOf(typer.ctrlchar.toLowerCase());
    if(i>=0) typer.Compose(this.actions[i]);
  }
  return this;
}

function CVKOff() {
  this.off = true;
  this.getAction= function(){};
  return this;
}

function CTelexKeys() {
  var k= new CVietKeys();
  k.keys= "sfjrxzaeowd";
  k.actions= [1,2,3,4,5,6,9,10,11,8,15];
  k.istelex= true;
  return k;
}

function CVniKeys() {
  var k= new CVietKeys();
  k.keys= "0123456789";
  k.actions= [6,1,2,4,5,3,7,8,8,15];
  return k;
}

function CViqrKeys() {
  var k= new CVietKeys();
  k.keys= "\xB4/'\u2019`.?~-^(*+d";
  k.actions= [1,1,1,1,2,3,4,5,6,7,8,8,8,15];
  return k;
}

function CAllKeys() {
  var k= new CVietKeys();
  k.keys= "sfjrxzaeowd0123456789\xB4/'`.?~-^(*+d";
  k.actions= [1,2,3,4,5,6,9,10,11,8,15,6,1,2,4,5,3,7,8,8,15,1,1,1,2,3,4,5,6,7,8,8,8,15];
  k.istelex= true;
  return k;
}

// end vietuni.js

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文字幕中文乱码欧美一区二区| 亚洲激情成人在线| 中文欧美字幕免费| 午夜精品久久久久久久99樱桃 | 91免费看`日韩一区二区| 国产乱一区二区| 成人性视频免费网站| 国产成人精品免费| 97精品国产97久久久久久久久久久久| 国产一区二区电影| www.日韩av| 色综合久久久网| 制服丝袜日韩国产| 久久久久久久综合狠狠综合| 欧美激情综合在线| 亚洲视频一区在线观看| 亚洲sss视频在线视频| 日本欧美肥老太交大片| 国产在线精品一区二区三区不卡| 国产成人av在线影院| 91香蕉视频在线| 欧美一区日韩一区| 久久久久国产一区二区三区四区| 国产精品高潮呻吟| 日韩在线播放一区二区| 国产白丝网站精品污在线入口| 日韩va亚洲va欧美va久久| 日本电影欧美片| 一级日本不卡的影视| 欧美亚洲综合在线| 亚洲图片欧美综合| 欧美久久一二三四区| 午夜婷婷国产麻豆精品| 1000精品久久久久久久久| 岛国一区二区在线观看| 中文字幕av一区二区三区免费看 | 成人在线一区二区三区| 91精品国产aⅴ一区二区| 欧美日韩国产另类不卡| 91成人免费网站| 精品日产卡一卡二卡麻豆| 最新成人av在线| 久久 天天综合| 欧美日韩一级二级| 中文字幕一区二区不卡| 国产一区欧美日韩| 国产在线不卡一区| 精品免费99久久| 国产福利电影一区二区三区| 国产精品美日韩| 色欲综合视频天天天| 午夜影院久久久| 日韩精品一区二区三区三区免费| 国产老女人精品毛片久久| 中文字幕一区av| 777奇米成人网| 国产一区二区中文字幕| 亚洲欧美日韩精品久久久久| 欧美在线免费播放| 国产精品资源在线看| 亚洲日韩欧美一区二区在线| 91麻豆精品国产91久久久 | 国产精品美女久久久久久| 欧美视频在线一区二区三区| 久久超级碰视频| 亚洲日本在线视频观看| 精品美女一区二区| 91免费观看视频在线| 久久精品国产**网站演员| 国产精品萝li| 欧美成人官网二区| 欧美在线制服丝袜| 国产精品一级在线| 日韩精品成人一区二区在线| 国产精品视频一二三区| 欧美疯狂性受xxxxx喷水图片| 国产91丝袜在线观看| 五月婷婷久久综合| 18成人在线观看| 久久蜜桃香蕉精品一区二区三区| 在线观看成人免费视频| 国产乱色国产精品免费视频| 视频一区在线视频| 亚洲欧美日韩国产中文在线| 精品国产91洋老外米糕| 欧美视频一区二区在线观看| 成人av在线一区二区| 精品一区二区在线观看| 亚洲国产精品一区二区久久恐怖片| caoporn国产一区二区| 久久久久国产精品人| 成人理论电影网| 一区二区三区中文免费| 欧美日韩国产系列| 免费不卡在线视频| 国产精品伦理一区二区| 在线日韩一区二区| 久久成人久久爱| 亚洲视频一区二区在线| 欧美精品乱码久久久久久按摩| 热久久免费视频| 欧美日韩久久一区| 国产精品99久久久久久似苏梦涵| 精品伊人久久久久7777人| 日韩专区一卡二卡| 五月激情综合婷婷| 日韩经典一区二区| 日韩高清国产一区在线| 午夜精品爽啪视频| 五月天激情小说综合| 日本伊人精品一区二区三区观看方式 | 精品在线观看免费| 理论电影国产精品| 另类小说一区二区三区| 九色porny丨国产精品| 久久99精品国产麻豆不卡| 精品在线一区二区三区| 国产一区二区在线影院| 成人永久aaa| 亚洲一区在线免费观看| 在线观看三级视频欧美| 风流少妇一区二区| 久久精品国产精品青草| 午夜欧美视频在线观看 | 7777精品伊人久久久大香线蕉经典版下载 | 国产亚洲精品超碰| 欧美片网站yy| 在线观看91视频| 成人app软件下载大全免费| 麻豆精品在线观看| 午夜欧美在线一二页| 亚洲精品乱码久久久久久久久 | 成人精品免费网站| 精品在线观看视频| 日韩午夜在线观看| 国产日韩欧美电影| 亚洲综合av网| 久久国产福利国产秒拍| 国产91丝袜在线播放0| 91成人看片片| 欧美变态凌虐bdsm| 亚洲男人电影天堂| 欧美日韩在线观看一区二区| 日韩一区二区在线免费观看| 亚洲国产精品成人久久综合一区| 亚洲日本在线天堂| 精东粉嫩av免费一区二区三区| 成人av电影免费观看| 日韩天堂在线观看| 中文字幕在线一区| 免费观看30秒视频久久| 99久久精品免费看| 日韩精品一区二区三区老鸭窝| 成人免费一区二区三区视频| 日韩精品一二区| 成人av资源在线| 日韩黄色免费网站| 中文字幕在线观看一区| 一区二区三区成人在线视频| 亚洲国产视频一区二区| 午夜激情综合网| 激情综合色播激情啊| 丁香激情综合国产| 日本精品一级二级| 日韩欧美视频一区| 国产亚洲欧美一区在线观看| 国产精品色哟哟网站| 亚洲精品免费播放| 另类小说色综合网站| 成人毛片在线观看| 欧美唯美清纯偷拍| 日韩精品一区二区三区在线观看 | 成人激情综合网站| 色八戒一区二区三区| 在线电影欧美成精品| 久久综合精品国产一区二区三区 | 粉嫩久久99精品久久久久久夜 | 2020国产精品自拍| 自拍av一区二区三区| 丝瓜av网站精品一区二区| 精品一区二区三区免费观看| 成人激情黄色小说| 欧美日韩国产高清一区二区 | 偷窥国产亚洲免费视频| 卡一卡二国产精品| 91精品国产综合久久婷婷香蕉| 亚洲一区二区视频| 色欲综合视频天天天| 亚洲精品伦理在线| 91久久一区二区| 亚洲黄色录像片| 在线亚洲免费视频| 一区二区三区精品久久久| 97久久精品人人做人人爽50路| 亚洲国产成人自拍| 欧美一级日韩不卡播放免费| 日本不卡1234视频| 日韩欧美国产wwwww| 久热成人在线视频| 久久色.com|