wxDiscode.js
4.65 KB
"use strict";function strNumDiscode(e){return e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(/∀/g,"∀")).replace(/∂/g,"∂")).replace(/&exists;/g,"∃")).replace(/∅/g,"∅")).replace(/∇/g,"∇")).replace(/∈/g,"∈")).replace(/∉/g,"∉")).replace(/∋/g,"∋")).replace(/∏/g,"∏")).replace(/∑/g,"∑")).replace(/−/g,"−")).replace(/∗/g,"∗")).replace(/√/g,"√")).replace(/∝/g,"∝")).replace(/∞/g,"∞")).replace(/∠/g,"∠")).replace(/∧/g,"∧")).replace(/∨/g,"∨")).replace(/∩/g,"∩")).replace(/∩/g,"∪")).replace(/∫/g,"∫")).replace(/∴/g,"∴")).replace(/∼/g,"∼")).replace(/≅/g,"≅")).replace(/≈/g,"≈")).replace(/≠/g,"≠")).replace(/≤/g,"≤")).replace(/≥/g,"≥")).replace(/⊂/g,"⊂")).replace(/⊃/g,"⊃")).replace(/⊄/g,"⊄")).replace(/⊆/g,"⊆")).replace(/⊇/g,"⊇")).replace(/⊕/g,"⊕")).replace(/⊗/g,"⊗")).replace(/⊥/g,"⊥")).replace(/⋅/g,"⋅")}function strGreeceDiscode(e){return e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(/Α/g,"Α")).replace(/Β/g,"Β")).replace(/Γ/g,"Γ")).replace(/Δ/g,"Δ")).replace(/Ε/g,"Ε")).replace(/Ζ/g,"Ζ")).replace(/Η/g,"Η")).replace(/Θ/g,"Θ")).replace(/Ι/g,"Ι")).replace(/Κ/g,"Κ")).replace(/Λ/g,"Λ")).replace(/Μ/g,"Μ")).replace(/Ν/g,"Ν")).replace(/Ξ/g,"Ν")).replace(/Ο/g,"Ο")).replace(/Π/g,"Π")).replace(/Ρ/g,"Ρ")).replace(/Σ/g,"Σ")).replace(/Τ/g,"Τ")).replace(/Υ/g,"Υ")).replace(/Φ/g,"Φ")).replace(/Χ/g,"Χ")).replace(/Ψ/g,"Ψ")).replace(/Ω/g,"Ω")).replace(/α/g,"α")).replace(/β/g,"β")).replace(/γ/g,"γ")).replace(/δ/g,"δ")).replace(/ε/g,"ε")).replace(/ζ/g,"ζ")).replace(/η/g,"η")).replace(/θ/g,"θ")).replace(/ι/g,"ι")).replace(/κ/g,"κ")).replace(/λ/g,"λ")).replace(/μ/g,"μ")).replace(/ν/g,"ν")).replace(/ξ/g,"ξ")).replace(/ο/g,"ο")).replace(/π/g,"π")).replace(/ρ/g,"ρ")).replace(/ς/g,"ς")).replace(/σ/g,"σ")).replace(/τ/g,"τ")).replace(/υ/g,"υ")).replace(/φ/g,"φ")).replace(/χ/g,"χ")).replace(/ψ/g,"ψ")).replace(/ω/g,"ω")).replace(/ϑ/g,"ϑ")).replace(/ϒ/g,"ϒ")).replace(/ϖ/g,"ϖ")).replace(/·/g,"·")}function strcharacterDiscode(e){return e=(e=(e=(e=(e=(e=e.replace(/ /g," ")).replace(/"/g,"'")).replace(/&/g,"&")).replace(/</g,"<")).replace(/>/g,">")).replace(/•/g,"•")}function strOtherDiscode(e){return e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(/Œ/g,"Œ")).replace(/œ/g,"œ")).replace(/Š/g,"Š")).replace(/š/g,"š")).replace(/Ÿ/g,"Ÿ")).replace(/ƒ/g,"ƒ")).replace(/ˆ/g,"ˆ")).replace(/˜/g,"˜")).replace(/ /g,"")).replace(/ /g,"")).replace(/ /g,"")).replace(/‌/g,"")).replace(/‍/g,"")).replace(/‎/g,"")).replace(/‏/g,"")).replace(/–/g,"–")).replace(/—/g,"—")).replace(/‘/g,"‘")).replace(/’/g,"’")).replace(/‚/g,"‚")).replace(/“/g,"“")).replace(/”/g,"”")).replace(/„/g,"„")).replace(/†/g,"†")).replace(/‡/g,"‡")).replace(/•/g,"•")).replace(/…/g,"…")).replace(/‰/g,"‰")).replace(/′/g,"′")).replace(/″/g,"″")).replace(/‹/g,"‹")).replace(/›/g,"›")).replace(/‾/g,"‾")).replace(/€/g,"€")).replace(/™/g,"™")).replace(/←/g,"←")).replace(/↑/g,"↑")).replace(/→/g,"→")).replace(/↓/g,"↓")).replace(/↔/g,"↔")).replace(/↵/g,"↵")).replace(/⌈/g,"⌈")).replace(/⌉/g,"⌉")).replace(/⌊/g,"⌊")).replace(/⌋/g,"⌋")).replace(/◊/g,"◊")).replace(/♠/g,"♠")).replace(/♣/g,"♣")).replace(/♥/g,"♥")).replace(/♦/g,"♦")).replace(/'/g,"'")}function strMoreDiscode(e){return e=(e=(e=e.replace(/\r\n/g,"")).replace(/\n/g,"")).replace(/code/g,"wxxxcode-style")}function strDiscode(e){return e=strMoreDiscode(e=strOtherDiscode(e=strcharacterDiscode(e=strGreeceDiscode(e=strNumDiscode(e)))))}function urlToHttpUrl(e,r){return new RegExp("^//").test(e)&&(e=r+":"+e),e}module.exports={strDiscode:strDiscode,urlToHttpUrl:urlToHttpUrl};