Created
May 8, 2018 03:16
-
-
Save hurss/ae27eaaee57f103614b1a3a8389d6054 to your computer and use it in GitHub Desktop.
연합뉴스용 간체자/약자/확장한자 변환기
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Text Replacement | |
// @namespace Text Replacement | |
// @description 연합뉴스용 간체자/약자/확장한자 변환기 | |
// @include * | |
// @exclude file://* | |
// @version 1 | |
// @grant none | |
// @author Damheo Lee ([email protected]) | |
// @run-at Tampermonkey (Greasemonkey) 설치후 사용 | |
// ==/UserScript== | |
(function () { | |
var els = document.querySelectorAll('p,strong,li,meta,연합뉴스'); | |
//var els = document.getElementsByTagName("P"); | |
for(var i = 0, l = els.length; i < l; i++) { | |
var el = els[i]; | |
// 벽자 | |
el.innerHTML = el.innerHTML.replace(/준<俊에서 사람인변 제거>/gi, '夋'); | |
el.innerHTML = el.innerHTML.replace(/<木\+觀>/gi, '欟'); | |
el.innerHTML = el.innerHTML.replace(/침<木\+岑>/gi, '梣'); | |
el.innerHTML = el.innerHTML.replace(/완<풀초 아래에 亂>/gi, '薍'); | |
el.innerHTML = el.innerHTML.replace(/낭<問에서 口 대신 良>/gi, '閬'); | |
el.innerHTML = el.innerHTML.replace(/랑<問에서 口 대신 良>/gi, '閬'); | |
el.innerHTML = el.innerHTML.replace(/口\+卒/gi, '啐'); | |
el.innerHTML = el.innerHTML.replace(/<口\+卒>/gi, '啐'); | |
el.innerHTML = el.innerHTML.replace(/<水\+亶>/gi, '澶'); | |
el.innerHTML = el.innerHTML.replace(/<手\+爲>/gi, '撝'); | |
el.innerHTML = el.innerHTML.replace(/우\[土\+偶자에 人변 없음\]/gi, '堣'); | |
el.innerHTML = el.innerHTML.replace(/면\[人변\+免\]/gi, '俛'); | |
el.innerHTML = el.innerHTML.replace(/역\[木변\+樂\]/gi, '櫟'); | |
el.innerHTML = el.innerHTML.replace(/력\[木변\+樂\]/gi, '櫟'); | |
el.innerHTML = el.innerHTML.replace(/논<木\+言\+木>/gi, '㯎'); | |
el.innerHTML = el.innerHTML.replace(/침<沈에서 물수변 대신 마음심변>/gi, '忱'); | |
// 브랜드 | |
el.innerHTML = el.innerHTML.replace(/經團連/gi, '経団連'); | |
el.innerHTML = el.innerHTML.replace(/月の滿ち欠け/gi, '月の満ち欠け'); | |
el.innerHTML = el.innerHTML.replace(/華爲/gi, '华为'); | |
el.innerHTML = el.innerHTML.replace(/多維/gi, '多维'); | |
el.innerHTML = el.innerHTML.replace(/新聞網/gi, '新闻网'); | |
el.innerHTML = el.innerHTML.replace(/人民網/gi, '人民网'); | |
el.innerHTML = el.innerHTML.replace(/央視網/gi, '央视网'); | |
el.innerHTML = el.innerHTML.replace(/浙江華友鈷業/gi, '浙江华友钴业'); | |
el.innerHTML = el.innerHTML.replace(/天安門/gi, '天安门'); | |
el.innerHTML = el.innerHTML.replace(/百度貼吧/gi, '百度贴吧'); | |
// 인명지명자 | |
el.innerHTML = el.innerHTML.replace(/<木\+庸>/gi, '槦'); | |
el.innerHTML = el.innerHTML.replace(/<王\+賓>/gi, '璸'); | |
el.innerHTML = el.innerHTML.replace(/예<초두머리 아래 刈>/gi, '苅'); | |
el.innerHTML = el.innerHTML.replace(/오<갈래지을 오, 人변\+口\+天, 天이 口아래에 있음>/gi, '俣'); | |
el.innerHTML = el.innerHTML.replace(/<魚\+念>/gi, '鯰'); | |
el.innerHTML = el.innerHTML.replace(/통<木\+通>/gi, '樋'); | |
el.innerHTML = el.innerHTML.replace(/신<木\+神>/gi, '榊'); | |
el.innerHTML = el.innerHTML.replace(/신<木\+神>/gi, '榊'); | |
el.innerHTML = el.innerHTML.replace(/십<于 대신 十이 들어간 迂>/gi, '辻'); | |
el.innerHTML = el.innerHTML.replace(/신<木+神>/gi, '榊'); | |
el.innerHTML = el.innerHTML.replace(/인<米\+刃>/gi, '籾'); | |
el.innerHTML = el.innerHTML.replace(/천<土\+川>/gi, '圳'); | |
el.innerHTML = el.innerHTML.replace(/빈<초두머리 아래 頻>/gi, '蘋'); | |
el.innerHTML = el.innerHTML.replace(/라<金\+羅>/gi, '鑼'); | |
el.innerHTML = el.innerHTML.replace(/지<兼대신虎들어간簾>/gi, '篪'); | |
el.innerHTML = el.innerHTML.replace(/니<人+爾>/gi, '你'); | |
el.innerHTML = el.innerHTML.replace(/구<求 밑에 衣>/gi, '裘'); | |
el.innerHTML = el.innerHTML.replace(/공<龍 밑에 共>/gi, '龔'); | |
el.innerHTML = el.innerHTML.replace(/탁<又대신尺들어간度>/gi, '庹'); | |
el.innerHTML = el.innerHTML.replace(/호<삼수변\+扈>/gi, '滬'); | |
el.innerHTML = el.innerHTML.replace(/위<火\+韋>/gi, '煒'); | |
el.innerHTML = el.innerHTML.replace(/반<月\+半>/gi, '胖'); | |
el.innerHTML = el.innerHTML.replace(/고<金\+古>/gi, '鈷'); | |
el.innerHTML = el.innerHTML.replace(/욕<山\+谷>/gi, '峪'); | |
el.innerHTML = el.innerHTML.replace(/로<山\+勞>/gi, '崂'); | |
el.innerHTML = el.innerHTML.replace(/<口\+幼>/gi, '呦'); | |
el.innerHTML = el.innerHTML.replace(/파<口\+巴>/gi, '吧'); | |
el.innerHTML = el.innerHTML.replace(/영<口\+永>/gi, '咏'); | |
el.innerHTML = el.innerHTML.replace(/섭<手변없는攝>/gi, '聶'); | |
el.innerHTML = el.innerHTML.replace(/섭<손수변 없는 攝>/gi, '聶'); | |
el.innerHTML = el.innerHTML.replace(/섭<손수변없는攝>/gi, '聶'); | |
el.innerHTML = el.innerHTML.replace(/손수변 없는 攝/gi, '聶'); | |
el.innerHTML = el.innerHTML.replace(/송<터럭발 아래 松>/gi, '鬆'); | |
el.innerHTML = el.innerHTML.replace(/묘<水 아래 水水>/gi, '淼'); | |
el.innerHTML = el.innerHTML.replace(/위<人대신火들어간偉>/gi, '煒'); | |
el.innerHTML = el.innerHTML.replace(/외<木\+危>/gi, '桅'); | |
el.innerHTML = el.innerHTML.replace(/추<木\+垂>/gi, '棰'); | |
el.innerHTML = el.innerHTML.replace(/각<木\+角>/gi, '桷'); | |
el.innerHTML = el.innerHTML.replace(/품<木\+品>/gi, '榀'); | |
el.innerHTML = el.innerHTML.replace(/체<木+隷>/gi, '棣'); | |
el.innerHTML = el.innerHTML.replace(/<金\(쇠금\)3개>/gi, '鑫'); | |
el.innerHTML = el.innerHTML.replace(/패<土\+覇>/gi, '壩'); | |
el.innerHTML = el.innerHTML.replace(/우<土\+于>/gi, '圩'); | |
el.innerHTML = el.innerHTML.replace(/진<至\+秦>/gi, '臻'); | |
el.innerHTML = el.innerHTML.replace(/뢰<손수변雷>/gi, '擂'); | |
// 중국관련 | |
el.innerHTML = el.innerHTML.replace(/中國/gi, '中国'); | |
el.innerHTML = el.innerHTML.replace(/廣東/gi, '广东'); | |
el.innerHTML = el.innerHTML.replace(/堀起/gi, '崛起'); | |
el.innerHTML = el.innerHTML.replace(/훙\(轟/gi, '훙\(轰'); | |
el.innerHTML = el.innerHTML.replace(/젠\(殲/gi, '젠\(歼'); | |
el.innerHTML = el.innerHTML.replace(/피리\(霹靂/gi, '피리\(霹雳'); | |
el.innerHTML = el.innerHTML.replace(/內蒙古/gi, '内蒙古'); | |
el.innerHTML = el.innerHTML.replace(/遼寧/gi, '辽宁'); | |
el.innerHTML = el.innerHTML.replace(/瀋陽/gi, '沈阳'); | |
el.innerHTML = el.innerHTML.replace(/룽징\(龍井/gi, '룽징\(龙井'); | |
el.innerHTML = el.innerHTML.replace(/遊客/gi, '游客'); | |
el.innerHTML = el.innerHTML.replace(/長沙/gi, '长沙'); | |
el.innerHTML = el.innerHTML.replace(/重慶/gi, '重庆'); | |
el.innerHTML = el.innerHTML.replace(/順義/gi, '顺义'); | |
el.innerHTML = el.innerHTML.replace(/잔란\(湛藍/gi, '잔란\(湛蓝'); | |
el.innerHTML = el.innerHTML.replace(/훙치\(紅旗/gi, '훙치\(红旗'); | |
el.innerHTML = el.innerHTML.replace(/잉지\(鷹擊/gi, '잉지\(鹰击'); | |
el.innerHTML = el.innerHTML.replace(/위\(魚/gi, '위\(鱼'); | |
el.innerHTML = el.innerHTML.replace(/둥펑\(東風/gi, '둥펑\(东风'); | |
el.innerHTML = el.innerHTML.replace(/陝西/gi, '陕西'); | |
el.innerHTML = el.innerHTML.replace(/淸華/gi, '清华'); | |
el.innerHTML = el.innerHTML.replace(/華東/gi, '华东'); | |
el.innerHTML = el.innerHTML.replace(/季風/gi, '季风'); | |
el.innerHTML = el.innerHTML.replace(/廣州/gi, '广州'); | |
el.innerHTML = el.innerHTML.replace(/武漢/gi, '武汉'); | |
el.innerHTML = el.innerHTML.replace(/遼寧/gi, '辽宁'); | |
el.innerHTML = el.innerHTML.replace(/大連/gi, '大连'); | |
el.innerHTML = el.innerHTML.replace(/溫州/gi, '温州'); | |
el.innerHTML = el.innerHTML.replace(/華潤/gi, '华润'); | |
el.innerHTML = el.innerHTML.replace(/九寨溝/gi, '九寨沟'); | |
el.innerHTML = el.innerHTML.replace(/騰迅/gi, '腾迅'); | |
el.innerHTML = el.innerHTML.replace(/阿壩/gi, '阿坝'); | |
el.innerHTML = el.innerHTML.replace(/寶鷄/gi, '宝鸡'); | |
el.innerHTML = el.innerHTML.replace(/漢中/gi, '汉中'); | |
el.innerHTML = el.innerHTML.replace(/悅達/gi, '悦达'); | |
// 일본관련 | |
el.innerHTML = el.innerHTML.replace(/도치기\(檜木/gi, '도치기\(栃木'); | |
el.innerHTML = el.innerHTML.replace(/회<又대신 万이 들어간 板>木/gi, '栃木'); | |
el.innerHTML = el.innerHTML.replace(/沖繩/gi, '沖縄'); | |
// 일본인명 | |
el.innerHTML = el.innerHTML.replace(/太郞/gi, '太郎'); | |
el.innerHTML = el.innerHTML.replace(/一郞/gi, '一郎'); | |
el.innerHTML = el.innerHTML.replace(/塚本/gi, '塚本'); | |
el.innerHTML = el.innerHTML.replace(/昭惠/gi, '昭恵'); | |
el.innerHTML = el.innerHTML.replace(/佐川宣壽/gi, '佐川宣寿'); | |
el.innerHTML = el.innerHTML.replace(/谷査惠子/gi, '谷査恵子'); | |
el.innerHTML = el.innerHTML.replace(/今井尙哉/gi, '今井尚哉'); | |
el.innerHTML = el.innerHTML.replace(/內藤榮/gi, '内藤栄'); | |
el.innerHTML = el.innerHTML.replace(/沼田眞佑/gi, '沼田真佑'); | |
el.innerHTML = el.innerHTML.replace(/鹽崎/gi, '塩崎'); | |
el.innerHTML = el.innerHTML.replace(/古館伊知郞/gi, '古舘伊知郎'); | |
el.innerHTML = el.innerHTML.replace(/水落敏榮/gi, '水落敏栄'); | |
// 중국인명 | |
el.innerHTML = el.innerHTML.replace(/劉建超/gi, '刘建超'); | |
el.innerHTML = el.innerHTML.replace(/樂玉成/gi, '乐玉成'); | |
el.innerHTML = el.innerHTML.replace(/楊潔篪/gi, '杨洁篪'); | |
el.innerHTML = el.innerHTML.replace(/習近平/gi, '习近平'); | |
el.innerHTML = el.innerHTML.replace(/溫家寶/gi, '温家宝'); | |
el.innerHTML = el.innerHTML.replace(/華春瑩/gi, '华春莹'); | |
el.innerHTML = el.innerHTML.replace(/傅瑩/gi, '傅莹'); | |
el.innerHTML = el.innerHTML.replace(/宋濤/gi, '宋涛'); | |
el.innerHTML = el.innerHTML.replace(/孫政才/gi, '孙政才'); | |
el.innerHTML = el.innerHTML.replace(/薄熙來/gi, '薄熙来'); | |
el.innerHTML = el.innerHTML.replace(/易綱/gi, '易纲'); | |
el.innerHTML = el.innerHTML.replace(/馮新柱/gi, '冯新柱'); | |
el.innerHTML = el.innerHTML.replace(/魯煒/gi, '鲁炜'); | |
el.innerHTML = el.innerHTML.replace(/劉强/gi, '刘强'); | |
el.innerHTML = el.innerHTML.replace(/張杰輝/gi, '张杰辉'); | |
el.innerHTML = el.innerHTML.replace(/楊曉渡/gi, '杨晓渡'); | |
el.innerHTML = el.innerHTML.replace(/陳敏爾/gi, '陈敏尔'); | |
el.innerHTML = el.innerHTML.replace(/韓正/gi, '韩正'); | |
el.innerHTML = el.innerHTML.replace(/張德江/gi, '张德江'); | |
el.innerHTML = el.innerHTML.replace(/劉雲山/gi, '刘云山'); | |
el.innerHTML = el.innerHTML.replace(/兪正聲/gi, '兪正声'); | |
el.innerHTML = el.innerHTML.replace(/張高麗/gi, '张高丽'); | |
el.innerHTML = el.innerHTML.replace(/毛澤東/gi, '毛泽东'); | |
el.innerHTML = el.innerHTML.replace(/胡春華/gi, '胡春华'); | |
el.innerHTML = el.innerHTML.replace(/栗戰書/gi, '栗战书'); | |
el.innerHTML = el.innerHTML.replace(/彭麗媛/gi, '彭丽媛'); | |
el.innerHTML = el.innerHTML.replace(/江澤民/gi, '江泽民'); | |
el.innerHTML = el.innerHTML.replace(/溫雲超/gi, '温云超'); | |
el.innerHTML = el.innerHTML.replace(/尙玉英/gi, '尚玉英'); | |
el.innerHTML = el.innerHTML.replace(/聶辰席/gi, '聂辰席'); | |
el.innerHTML = el.innerHTML.replace(/嚴搏非/gi, '严搏非'); | |
el.innerHTML = el.innerHTML.replace(/秦暉/gi, '秦晖'); | |
el.innerHTML = el.innerHTML.replace(/童之偉/gi, '童之伟'); | |
el.innerHTML = el.innerHTML.replace(/劉鶴/gi, '刘鹤'); | |
el.innerHTML = el.innerHTML.replace(/王義桅/gi, '王义桅'); | |
el.innerHTML = el.innerHTML.replace(/陳風英/gi, '陈风英'); | |
el.innerHTML = el.innerHTML.replace(/周恩來/gi, '周恩来'); | |
el.innerHTML = el.innerHTML.replace(/劉少奇/gi, '刘少奇'); | |
el.innerHTML = el.innerHTML.replace(/鄧小平/gi, '邓小平'); | |
el.innerHTML = el.innerHTML.replace(/劉曉波/gi, '刘晓波'); | |
el.innerHTML = el.innerHTML.replace(/王立軍/gi, '王立军'); | |
el.innerHTML = el.innerHTML.replace(/賈榀/gi, '贾榀'); | |
el.innerHTML = el.innerHTML.replace(/黎學文/gi, '黎学文'); | |
el.innerHTML = el.innerHTML.replace(/黃思敏/gi, '黄思敏'); | |
el.innerHTML = el.innerHTML.replace(/吳斌/gi, '吴斌'); | |
el.innerHTML = el.innerHTML.replace(/夏寶龍/gi, '夏宝龙'); | |
el.innerHTML = el.innerHTML.replace(/車俊/gi, '车俊'); | |
el.innerHTML = el.innerHTML.replace(/王東明/gi, '王东明'); | |
el.innerHTML = el.innerHTML.replace(/郭文貴/gi, '郭文贵'); | |
el.innerHTML = el.innerHTML.replace(/傅政華/gi, '傅政华'); | |
el.innerHTML = el.innerHTML.replace(/胡錦濤/gi, '胡锦涛'); | |
el.innerHTML = el.innerHTML.replace(/鄧卓棣/gi, '邓卓棣'); | |
el.innerHTML = el.innerHTML.replace(/劉宗巍/gi, '刘宗巍'); | |
//el.innerHTML = el.innerHTML.replace(//gi, ''); | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment