Japanese DLSite translation

Replaces Japanese text on DLSite

As of 10/01/2017. See the latest version.

// ==UserScript==
// @name           Japanese DLSite translation
// @namespace      http://userscripts.org/users/23652
// @description    Replaces Japanese text on DLSite
// @include        *dlsite.com/*
// @exclude        *dlsite.com/ecchi-eng/*
// @grant          none
// @copyright      JoeSimmons
// @version        1.0.1
// @license        http://creativecommons.org/licenses/by-nc-nd/3.0/us/
// ==/UserScript==
(function () {
    'use strict';


    /*
        NOTE: 
            You can use \\* to match actual asterisks instead of using it as a wildcard!
            The examples below show a wildcard in use and a regular asterisk replacement.
    */

    var words = {
    ///////////////////////////////////////////////////////


        // Syntax: 'Search word' : 'Replace word',
        '対象性別' : 'Audience',
        '男性向け' : 'Males',
        'ロールプレイングゲーム' : 'RPG',
        'サークル一覧' : 'Circles',
        '成人向けすべて' : 'Adult All',
        '成人向け同人' : 'Adult Doujin',
        '成人向けPCソフト' : 'Adult PC soft',
        '同人ゲーム' : 'Doujin Game',
        'アプリケーション' : 'Executable File',
        'バージョンアップ情報' : 'Upgrade Information',
        '販売日' : 'Release',
        '最終更新日' : 'Last Modified',
        '年齢指定' : 'Age Ratings',
        '18禁' : 'R18+',
        '作品形式' : 'Categories',
        'ファイル形式' : 'File Format',
        '対応OS' : 'OS Platforms',
        'その他オプション' : 'Additional Options',
        'その他同人誌' : 'Other Doujins',
        'その他同人ソフト' : 'Other Doujin Soft',
        'その他ゲーム' : 'Other Games',
        'その他' : 'Other',
        'マイジャンル' : 'Tags',
        'サンプル' : 'Samples',
        'HTML版で表示' : 'Display in HTML format',
        'ホームページ' : 'Website',
        'サークル名' : 'Circle',
        '並び替え' : 'Sort by',
        '件中' : 'Total',
        '件目' : 'Showing',
        '発売日が新しい順' : 'Release date - New to Old',
        '発売日が古い順' : 'Release date - Old to New',
        'DL数が多い順' : 'Numer of Dowloads',
        '価格が安い順' : 'Price - Low to High',
        '価格が高い順' : 'Price - High to Low',
        '評価が高い順' : 'Rating - High to Low',
        'レビューが多い順' : 'Reviews - High to Low',
        '表示件数' : 'Display',
        '表示形式' : 'View',
        '次へ' : 'Next',
        '最後へ' : 'Last Page',
        '最初へ' : 'First Page',
        '前へ' : 'Previous',
        'お気に入りに追加' : 'Favorite',
        'キーワード' : 'Keywords',
        '検索条件を変更する' : 'Modify search conditions',
        '/\\b年\\b/g' : '/',
        '/\\b月\\b/g' : '/',
        '/\\b日/g' : '',
        '保存した検索条件' : 'My Favorite',
        '検索条件' : 'Search for',
        'ジャンル' : 'Tags',
        '検索結果' : 'Results',
        '他の趣味嗜好で探す' : 'Advanced Search',
        'シリーズ名' : 'Series',
        'イベント' : 'Event',
        '作品名' : 'Title',
        'オプション' : 'Option',
        '割引中の作品' : 'Items at Discount',
        '専売/独占/先行作品' : 'DLsite Exclusive',
        '販売開始日' : 'Release Date',
        '指定なし' : 'All',
        '1週間以内' : 'Last 7 days',
        '1ヶ月以内' : 'Last 30 days',
        '1年以内' : 'Past 12 months',
        'それ以前' : 'Older',
        '価格帯' : 'Price Range',
        '円以下' : ' JPY and less',
        '円以上' : ' JPY and more',
        '/\\b円/g' : ' JPY',
        '販売状況' : 'Sale status',
        '販売中' : 'Works available for sale',
        '予告中' : 'Upcoming works',
        '指定しない' : 'All',
        '対象作品' : 'Target work',
        '同人作品' : 'Doujin',
        'PCゲーム' : 'PC game',
        '電子書籍' : 'E-book',
        '全年齢向け' : 'All ages',
        'R指定' : 'R-15',
        '成人向け' : 'Adult ',
        '表示順序' : 'Sort by',
        '通常表示' : 'Standard view',
        '画像のみ' : 'Gallery view',
        '/\\b件/g' : ' pages',
        'デジタルコミック' : 'Digital Comic',
        '劇画' : 'Gekiga',
        'マンガ' : 'Manga',
        'CG集' : 'CG Collection',
        'イラスト集' : 'Illustration',
        'イラスト' : 'Illust',
        '同人ソフトノベル' : 'Doujin Software Novel',
        '同人誌ノベル' : 'Doujin Novel',
        '写真集' : 'Photo Album',
        'ツール/アクセサリ' : 'Utility / Tool',
        '素材' : 'Materials',
        '作品' : '',
        '音声あり' : 'Voiced',
        '音楽あり' : 'With Music',
        '動画あり' : 'With Video',
        'アクション' : 'Action',
        'クイズ' : 'Quiz',
        'アドベンチャー' : 'Adventure',
        'ロールプレイング' : 'RPG',
        'テーブルゲーム' : 'Table',
        'デジタルノベル' : 'Digital Novel',
        'シミュレーション' : 'Simulation',
        'タイピング' : 'Typing',
        'シューティング' : 'Shooter',
        'パズル' : 'Puzzle',
        'ゲーム' : 'Game',
        '画集' : 'Artbooks',
        'ノベル' : 'Novel',
        '趣味嗜好' : 'Preferences',
        'いずれかを含む' : 'One or more of these words',
        '全てを含む' : 'All these words',
        'こだわり/アピール' : 'Focus/Appeals',
        '萌え' : 'Moe',
        'ツンデレ' : 'Tsundere',
        '燃え' : 'Hot',
        '感動' : 'Tearjerker',
        '癒し' : 'Healing',
        '鬱' : 'Depression',
        '淡白/あっさり' : 'Plain/Nonpersisting',
        'オールハッピー' : 'Totally Happy',
        '着衣' : 'Clothed',
        'チラリズム' : 'Peeping',
        'フェチ' : 'Fetish',
        '女性視点' : 'Woman\'s Viewpoint',
        '女主人公のみ' : 'Female Heroine Only',
        '男無' : 'No Male',
        '逆転無し' : 'No Reverse',
        'マニアック' : 'Maniac',
        'アブノーマル' : 'Abnormal',
        'おさわり' : 'Touching',
        'きせかえ' : 'Clothes Changing ',
        '脚' : 'Legs',
        'お尻/ヒップ' : 'Buttocks',
        'おっぱい' : 'Breasts',
        '淫語' : 'Dirty Talk',
        '汁/液大量' : 'Lots of Cum',
        '連続絶頂' : 'Successive Orgasms',
        '断面図' : 'Inside View',
        'ベタ/コテコテ' : 'Predictable Story',
        'ドット' : 'Pixel Art',
        'ポリゴン' : '3D',
        'アニメ' : 'Anime',
        '催眠' : 'Hypnotic ',
        'アンソロジー' : 'Anthology',
        'アイテム/道具' : 'Featured Items/Tools',
        'リボン' : 'Ribbon',
        'カチューシャ' : 'Headband',
        'ピアス/装飾品' : 'Earrings',
        'メガネ' : 'Glasses',
        '靴下' : 'Socks',
        '首輪/鎖/拘束具' : 'Collar/Chain/Hamper',
        'ムチ/縄/蝋燭' : 'Whip/Rope/Candle',
        '包帯/注射器' : 'Bandage/Injector',
        '薬物' : 'Drug',
        'ローション' : 'Lotion',
        'スタンガン' : 'Stun Gun',
        'おむつ' : 'Diaper',
        'おもちゃ' : 'Toy',
        '道具/異物' : 'Foreign Object',
        'キャラクター' : 'Characters',
        '少女' : 'Girl',
        'ぷに' : 'Puni',
        '少年' : 'Boy',
        '年上' : 'Senior',
        '母親' : 'Mother',
        '義妹' : 'Younger Stepsister',
        '義母' : 'Stepmother',
        '実姉' : 'Real Older Sister',
        '義姉' : 'Older Stepsister',
        '叔父/義父' : 'Uncle/Stepfather',
        '熟女' : 'Mature Woman',
        '人妻' : 'Married Woman',
        'お姉さん' : 'Older Girl/Older Sister',
        '未亡人' : 'Widow',
        '既婚者' : 'Married Person',
        '男性/おやじ' : 'Man/Middle-age',
        '幼なじみ' : 'Childhood Friend',
        '双子' : 'Twins',
        '姉妹' : 'Sisters',
        '保健医' : 'School Nurse',
        '女医' : 'Female Doctor',
        '女教師' : 'Female Teacher',
        '教師' : 'Teacher',
        '学生' : 'Student',
        '委員長' : 'Class President',
        '同級生/同僚' : 'Classmate',
        '先輩/後輩' : 'Junior & Senior Students',
        '上司' : 'Boss',
        'OL' : 'Office Lady',
        '秘書' : 'Secretary',
        'サラリーマン' : 'Salaried Worker',
        'ホスト' : 'Host',
        'リーマン' : 'Salariman',
        'お嬢様' : 'Upper-class Girl',
        'ギャル' : 'Gal',
        'ビッチ' : 'Bitch',
        '天然' : 'Natural',
        '電波' : 'Frantic',
        '主従' : 'Master and Servant',
        '執事' : 'Butler',
        '女王様/お姫様' : 'Queen/Princess',
        'エルフ/妖精' : 'Elf/Fairy',
        '天使/悪魔' : 'Angel/Demon',
        '変身ヒロイン' : 'Transforming Girl',
        '魔法少女' : 'Magical Girl',
        '魔法使い/魔女' : 'Witch',
        '男の娘' : 'Trap',
        '妖怪' : 'Specter',
        '擬人化' : 'Personification',
        'ヤンデレ' : 'Yandere',
        '人外娘/モンスター娘' : 'Nonhuman/Monster Girl',
        'モンスター娘' : 'Monster Girl',
        'ドジっ娘' : 'Clumsy Girl',
        'ロボット' : 'Robot',
        'レトロ/耽美' : 'Retro/Aesthetic',
        '芸能人/アイドル/モデル' : 'Entertainer/Idol/Model',
        '警察/刑事' : 'Police',
        'ヤクザ/裏社会' : 'Crime/Gangster',
        '不良/ヤンキー' : 'Bad Boy/Hoodlum',
        'ガテン系' : 'Blue-collar Worker',
        'レスラー/格闘家' : 'Wrestler/Fighter',
        '幽霊' : 'Ghost',
        'ゾンビ' : 'Zombie',
        'ヤリチン/プレイボーイ' : 'Playboy',
        '同性愛者' : 'Homosexual',
        'けもの/獣化' : 'Animalize',
        'ショタケモ' : 'Furry (Shota)',
        'インテリ' : 'Intellectual',
        '外国人' : 'Foreigner',
        '体育会系' : 'Jock',
        'スポーツ選手' : 'Athlete',
        'ニューハーフ' : 'Shemale',
        '戦士' : 'Warrior',
        '俺様攻め' : 'Lordly Manner (Dominant)',
        'クール攻め' : 'Cool Man (Dominant)',
        'ヘタレ攻め' : 'Lazy (Dominant)',
        '強気受け' : 'Tough Guy (Submissive)',
        '誘い受け' : 'Seduce (Submissive)',
        'やんちゃ受け' : 'Mischievous (Submissive)',
        'オヤジ受け' : 'Older Man (Submissive)',
        'クール受け' : 'Cool Man (Submissive)',
        '健気受け' : 'Diligent Man (Submissive)',
        '乙女受け' : 'Girl (Submissive)',
        '妹' : 'Younger Sister',
        '娘' : 'Daughter',
        '兄' : 'Older Brother',
        '弟' : 'Younger Brother',
        '父' : 'Father',
        '先輩' : 'Senpai',
        'ショタ' : 'Shota',
        'コスチューム/衣装/職業' : 'Outfits/Occupations',
        '制服' : 'Uniform',
        'セーラー服' : 'Sailor-style Uniform',
        '体操着' : 'Gym Clothes',
        '道着' : 'Judo Uniform',
        'スポユニ' : 'Sports Uniform',
        'メイド' : 'Maid',
        'ナース' : 'Nurse',
        '巫女' : 'Shrine Maiden',
        '軍服' : 'Army Uniform',
        '下着' : 'Underwear',
        'パンツ' : 'Panties',
        'ふんどし' : 'Loincloth',
        'レース/フリル' : 'Lacy/Frilled',
        'ゴスロリ' : 'Gothic Lolita',
        'ロリ' : 'Loli',
        'コスプレ' : 'Cosplay',
        'ボンデージ' : 'Bondage',
        'ブルマ' : 'Gym Shorts',
        'チャイナ' : 'Chinese Dress',
        'ミニスカ' : 'Short Skirt',
        '着物/和服' : 'Kimono/Japanese Dress',
        'エプロン' : 'Apron',
        'ラバー' : 'Rubber',
        'レオタード' : 'Leotard',
        '白衣' : 'White coat',
        'シスター' : 'Sister',
        'ワイシャツ' : 'Dress Shirt',
        'ウェイトレス' : 'Waitress',
        'バニーガール' : 'Bunny Girl',
        'スパッツ' : 'Leggings',
        'ニーソックス' : 'Knee Socks',
        'ストッキング' : 'Stockings',
        'ローレグ' : 'Low-cut Legs',
        'スクール水着' : 'School Swimsuit',
        '水着' : 'Swimsuit',
        'スーツ' : 'Suit',
        'ガードル' : 'Girdle',
        'ガーター' : 'Garter',
        '半ズボン' : 'Breeches',
        'ブレザー' : 'Blazer',
        '男装' : 'Cross-dressed Woman',
        '女装' : 'Crossdress',
        '社長' : 'President',
        '医者' : 'Doctor',
        'アイドル' : 'Idol',
        'シチュエーション/系統' : 'Situations/Tastes',
        '学校/学園' : 'School',
        'オフィス/職場' : 'Office',
        'ラブコメ' : 'Funny Love Story',
        '耳かき' : 'Ear Cleaning',
        '屋外' : 'Outdoor',
        'ギャグ' : 'Hilarious',
        'ラブラブ/あまあま' : 'Romance',
        '退廃/背徳/インモラル' : 'Decadent/Immoral',
        '憑依' : 'Possession',
        '石化' : 'Petrifaction',
        '家族' : 'Family',
        'コメディ' : 'Comedy',
        '日常/生活' : 'Drama/Daily Living',
        '時間停止' : 'Time Stopping',
        'ミリタリー' : 'Military',
        'SF' : 'Sci Fi',
        'スポーツ' : 'Sports',
        '格闘' : 'Fight',
        'ほのぼの' : 'Heartwarming',
        '同棲' : 'Cohabitation',
        '恋人同士' : 'Lovers',
        '遠距離恋愛' : 'Long-distance Love',
        '初体験' : 'First Experience',
        '出会い' : 'Encounter',
        'サークル' : 'Circle',
        '色仕掛け' : 'Coquettish',
        '女体化' : 'Feminization',
        '性転換(TS)' : 'Transsexual',
        '浮気' : 'Cheating',
        '三角関係' : 'Love Triangle',
        '売春/援交' : 'Prostitution',
        '風俗/ソープ' : 'Soapland',
        'シリアス' : 'Serious',
        'ファンタジー' : 'Fantasy',
        '歴史/時代物' : 'Epic/Historical',
        'パラレル' : 'Parallel',
        'ホラー' : 'Horror',
        'キャットファイト' : 'Cat Fight',
        'スプラッター' : 'Splatter',
        'サスペンス' : 'Suspense',
        'ハードボイルド' : 'Hard-boiled',
        'バイオレンス' : 'Violence',
        'ギャンブル' : 'Gambling',
        'ノンフィクション/体験談' : 'Non-fiction/Real Story',
        'ヤキモチ' : 'Jealousy',
        'オカルト' : 'Occult',
        '歳の差' : 'May and December',
        '魔法' : 'Magic',
        '芸能' : 'Entertainment',
        '同居' : 'Roommate',
        '純愛' : 'Pure Love',
        '耽美' : 'Shonen-ai',
        '戦場' : 'War',
        'おもらし' : 'Urination',
        '伝奇' : 'Marvel Tales',
        'ティーンズラブ' : 'Teens Love',
        'ボーイズラブ' : 'Boys Love',
        '年下攻' : 'Younger Man (Dominant)',
        'ハーレム' : 'Harem',
        'やおい' : 'Yaoi',
        '寝取られ' : 'Netorare',
        '百合' : 'Yuri',
        'ミステリー' : 'Mystery',
        '丸呑み' : 'Vore',
        '電車' : 'Train',
        '寝取り' : 'Netori',
        '歴史' : 'History',
        'プレイ/えっち傾向' : 'Actions/Sexual Tendencies',
        '手コキ' : 'Hand Job',
        '足コキ' : 'Foot Job',
        'ぶっかけ' : 'Bukkake',
        '顔射' : 'Facial',
        '中出し' : 'Internal Cumshot',
        '妊娠/孕ませ' : 'Pregnancy/Impregnation',
        'パイズリ' : 'Breast Sex',
        'レズ/女同士' : 'Lesbian',
        'ホモ/男同士' : 'Homosexual',
        '母乳' : 'Breast Milk',
        '搾乳' : 'Milking',
        '出産' : 'Childbirth',
        '産卵' : 'Egg Production',
        '陵辱' : 'Violation',
        'オナニー' : 'Masturbation',
        'SM' : 'S&M',
        '緊縛' : 'Tight Binding',
        'フェラチオ' : 'Blowjob',
        '痴漢' : 'Molestation',
        '調教' : 'Sexual Training',
        '変態' : 'Hentai',
        '淫乱' : 'Naughty',
        '露出' : 'Outdoor Exposure',
        '言葉責め' : 'Oral Assault',
        '青姦' : 'Outdoor Sex',
        '拘束' : 'Restraint',
        '奴隷' : 'Slave',
        '浣腸' : 'Enema',
        '羞恥' : 'Ashamed',
        '恥辱' : 'Humiliation',
        '監禁' : 'Captivity',
        '焦らし' : 'Tease',
        'くすぐり' : 'Tickling',
        '鬼畜' : 'Pervert',
        'ノーマルプレイ' : 'Vanilla Sex',
        '放置プレイ' : 'Neglect',
        '複数プレイ/乱交' : 'Orgy',
        '強制/無理矢理' : 'Coercion/Compulsion',
        '無理矢理' : 'Coercion',
        '輪姦' : 'Gangbang',
        '和姦' : 'Consensual Sex',
        '近親相姦' : 'Incest',
        '逆レイプ' : 'Woman Rapes Man',
        '盗撮' : 'Upskirt/Spy Photo',
        '男性受け' : 'Submissive Man',
        'Hypnotic' : 'Hypnosis',
        '放尿/おしっこ' : 'Golden Shower/Urine',
        'アナル' : 'Anal',
        'スカトロ' : 'Scatology',
        '尿道' : 'Urethra',
        '触手' : 'Tentacle',
        '獣姦' : 'Bestiality',
        '機械姦' : 'Robot Sex',
        '拡張' : 'Stretch/Expansion',
        '下克上' : 'Junior\'s Domination',
        'ソフトエッチ' : 'Soft Erotic',
        'アヘ顔' : 'Ahegao',
        'モブ姦' : 'Nameless Sex',
        '異種姦' : 'Interspecies Sex',
        '悪堕ち' : 'Corrupted Morals',
        '洗脳' : 'Brainwashing',
        'ごっくん/食ザー' : 'Cum Swallow',
        '口内射精' : 'Oral Cumshot',
        'イラマチオ' : 'Forced Oral',
        'スパンキング' : 'Spanking',
        'バイ' : 'Bisexual',
        'レイプ' : 'Rape',
        '外見/身体的特徴' : 'Physical Characteristics',
        'ショートカット' : 'Short hair',
        'ロングヘア' : 'Long Hair',
        'おかっぱ' : 'Bobbed Hair',
        '茶髪' : 'Brown Hair',
        '金髪' : 'Blonde Hair',
        '黒髪' : 'Brunet Hair',
        '三つ編み' : 'Braid',
        'ポニーテール' : 'Ponytail',
        'ツインテール' : 'Twin Tail',
        'ネコミミ' : 'Cat Ears',
        '獣耳' : 'Animal Ears',
        '長身' : 'Tall Woman',
        '羽根' : 'Wings',
        '筋肉' : 'Muscular',
        '巨乳/爆乳' : 'Big Breasts',
        '貧乳/微乳' : 'Tiny Breasts',
        '複乳/怪乳/超乳' : 'Multiple Breasts',
        '乳首/乳輪' : 'Nipples',
        'ぼて腹/妊婦' : 'Pregnant Woman',
        'スレンダー' : 'Slender',
        'つるぺた' : 'Childlike Build',
        'パイパン' : 'Hairless',
        '陰毛/腋毛' : 'Pubic Hair',
        'ふたなり' : 'Futanari/Dick girl',
        '巨根' : 'Large Cock',
        '童貞' : 'Virgin/Intact Male',
        '処女' : 'Virgin Female',
        '巨大化' : 'Supersize',
        'しっぽ' : 'Tail',
        '関西弁' : 'Kansai Dialect',
        'ボクっ娘' : 'Boyish Girl',
        '無表情' : 'Deadpan',
        '褐色/日焼け' : 'Tanned Skin/Suntan',
        'タトゥー/刺青' : 'Tattoo',
        '包茎' : 'Phimosis',
        'スリム/スレンダー' : 'Slim',
        'むちむち' : 'Chubby/Plump',
        '太め' : 'Chubby',
        'デブ' : 'Fat',
        '爺' : 'Old Man',
        '残酷系/異常系' : 'Violence/Guro',
        '腹パン' : 'Gut Punch',
        '猟奇' : 'Psychotic',
        '人体改造' : 'Body Modification',
        '拷問' : 'Torture',
        'フィストファック' : 'Fist Sex',
        'ニプルファック' : 'Nipple Sex',
        '血液/流血' : 'Blood',
        '狂気' : 'Madness',
        'リョナ' : 'Ryona/Brutal',
        '蟲姦' : 'Worm Sex',
        'グロテスクな表現を含む' : 'Contains grotesque imagery',
        'ホモセクシャルな表現を含む' : 'Contains homosexual imagery',
        'プロテクトを除外する' : 'Exclude copy-controlled works',
        '体験版あり' : 'Trial version',
        'レビューあり' : 'User reviews',
        'PDF同梱' : 'PDF File',
        'APK同梱' : 'APK File',
        'almight対応' : 'Almight engine',
        'ブラウザ試聴' : 'Browser streaming',
        '平均評価' : 'Average rating',
        'コミックマーケット' : 'Comic Market ',
        'HTMLファイル' : 'HTML file',
        '+画像' : '+Image',
        '画像ファイル' : 'Image file',
        'Androidアプリファイル' : 'App file fоr Android',
        '\)ファイル' : '\)',
        'ファイル' : ' file',
        'ムービー' : 'Video ',
        'オーディオ\(' : 'Audio \(',
        '画像' : 'Image ',
        'オーディオ' : 'Audio',
        '動画' : 'Video',
        '音声' : 'Voice',
        '音楽' : 'Music',
        'ランキング' : 'Ranking',
        'DLsite専売' : 'Exclusives',
        'おすすめ特集' : 'Recommend',
        '発売カレンダー' : 'Releases',
        '発売予告' : 'Upcoming',
        '詳細検索' : 'Advanced Search',
        '料理' : 'Cooking',
        '「' : ' \"',
        '」' : '\" ',
      
    ///////////////////////////////////////////////////////
    '':''};











    //////////////////////////////////////////////////////////////////////////////
    // This is where the real code is
    // Don't edit below this
    //////////////////////////////////////////////////////////////////////////////

    var regexs = [], replacements = [],
        tagsWhitelist = ['INPUT', 'TEXTAREA'],
        rIsRegexp = /^\/(.+)\/([gim]+)?$/,
        word, text, texts, i, userRegexp;

    // prepareRegex by JoeSimmons
    // used to take a string and ready it for use in new RegExp()
    function prepareRegex(string) {
        return string.replace(/([\[\]\^\&\$\.\(\)\?\/\\\+\{\}\|])/g, '\\$1');
    }

    // function to decide whether a parent tag will have its text replaced or not
    function isTagOk(tag) {
        return tagsWhitelist.indexOf(tag) === -1;
    }

    delete words['']; // so the user can add each entry ending with a comma,
                      // I put an extra empty key/value pair in the object.
                      // so we need to remove it before continuing

    // convert the 'words' JSON object to an Array
    for (word in words) {
        if ( typeof word === 'string' && words.hasOwnProperty(word) ) {
            userRegexp = word.match(rIsRegexp);

            // add the search/needle/query
            if (userRegexp) {
                regexs.push(
                    new RegExp(userRegexp[1], 'g')
                );
            } else {
                regexs.push(
                    new RegExp(prepareRegex(word).replace(/\\?\*/g, function (fullMatch) {
                        return fullMatch === '\\*' ? '*' : '[^ ]*';
                    }), 'g')
                );
            }

            // add the replacement
            replacements.push( words[word] );
        }
    }

    // do the replacement
    texts = document.evaluate('//body//text()[ normalize-space(.) != "" ]', document, null, 6, null);
    for (i = 0; text = texts.snapshotItem(i); i += 1) {
        if ( isTagOk(text.parentNode.tagName) ) {
            regexs.forEach(function (value, index) {
                text.data = text.data.replace( value, replacements[index] );
            });
        }
    }

}());