This repository has been archived on 2024-07-11. You can view files and clone it, but cannot push or open issues or pull requests.
yoshop-wechat/wxParse/wxDiscode.js
2020-04-25 22:59:04 +08:00

74 lines
5.3 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

function e(e) {
return e = e.replace(/∀/g, "∀"), e = e.replace(/∂/g, "∂"), e = e.replace(/&exists;/g, "∃"),
e = e.replace(/∅/g, "∅"), e = e.replace(/∇/g, "∇"), e = e.replace(/∈/g, "∈"),
e = e.replace(/∉/g, "∉"), e = e.replace(/∋/g, "∋"), e = e.replace(/∏/g, "∏"),
e = e.replace(/∑/g, "∑"), e = e.replace(/−/g, ""), e = e.replace(/∗/g, ""),
e = e.replace(/√/g, "√"), e = e.replace(/∝/g, "∝"), e = e.replace(/∞/g, "∞"),
e = e.replace(/∠/g, "∠"), e = e.replace(/∧/g, "∧"), e = e.replace(/∨/g, ""),
e = e.replace(/∩/g, "∩"), e = e.replace(/∩/g, ""), e = e.replace(/∫/g, "∫"),
e = e.replace(/∴/g, "∴"), e = e.replace(/∼/g, ""), e = e.replace(/≅/g, "≅"),
e = e.replace(/≈/g, "≈"), e = e.replace(/≠/g, "≠"), e = e.replace(/≤/g, "≤"),
e = e.replace(/≥/g, "≥"), e = e.replace(/⊂/g, "⊂"), e = e.replace(/⊃/g, "⊃"),
e = e.replace(/⊄/g, "⊄"), e = e.replace(/⊆/g, "⊆"), e = e.replace(/⊇/g, "⊇"),
e = e.replace(/⊕/g, "⊕"), e = e.replace(/⊗/g, "⊗"), e = e.replace(/⊥/g, "⊥"),
e = e.replace(/⋅/g, "⋅");
}
function a(e) {
return e = e.replace(/Α/g, "Α"), e = e.replace(/Β/g, "Β"), e = e.replace(/Γ/g, "Γ"),
e = e.replace(/Δ/g, "Δ"), e = e.replace(/Ε/g, "Ε"), e = e.replace(/Ζ/g, "Ζ"),
e = e.replace(/Η/g, "Η"), e = e.replace(/Θ/g, "Θ"), e = e.replace(/Ι/g, "Ι"),
e = e.replace(/Κ/g, "Κ"), e = e.replace(/Λ/g, "Λ"), e = e.replace(/Μ/g, "Μ"),
e = e.replace(/Ν/g, "Ν"), e = e.replace(/Ξ/g, "Ν"), e = e.replace(/Ο/g, "Ο"),
e = e.replace(/Π/g, "Π"), e = e.replace(/Ρ/g, "Ρ"), e = e.replace(/Σ/g, "Σ"),
e = e.replace(/Τ/g, "Τ"), e = e.replace(/Υ/g, "Υ"), e = e.replace(/Φ/g, "Φ"),
e = e.replace(/Χ/g, "Χ"), e = e.replace(/Ψ/g, "Ψ"), e = e.replace(/Ω/g, "Ω"),
e = e.replace(/α/g, "α"), e = e.replace(/β/g, "β"), e = e.replace(/γ/g, "γ"),
e = e.replace(/δ/g, "δ"), e = e.replace(/ε/g, "ε"), e = e.replace(/ζ/g, "ζ"),
e = e.replace(/η/g, "η"), e = e.replace(/θ/g, "θ"), e = e.replace(/ι/g, "ι"),
e = e.replace(/κ/g, "κ"), e = e.replace(/λ/g, "λ"), e = e.replace(/μ/g, "μ"),
e = e.replace(/ν/g, "ν"), e = e.replace(/ξ/g, "ξ"), e = e.replace(/ο/g, "ο"),
e = e.replace(/π/g, "π"), e = e.replace(/ρ/g, "ρ"), e = e.replace(/ς/g, "ς"),
e = e.replace(/σ/g, "σ"), e = e.replace(/τ/g, "τ"), e = e.replace(/υ/g, "υ"),
e = e.replace(/φ/g, "φ"), e = e.replace(/χ/g, "χ"), e = e.replace(/ψ/g, "ψ"),
e = e.replace(/ω/g, "ω"), e = e.replace(/ϑ/g, "ϑ"), e = e.replace(/ϒ/g, "ϒ"),
e = e.replace(/ϖ/g, "ϖ"), e = e.replace(/·/g, "·");
}
function r(e) {
return e = e.replace(/ /g, '\xa0'), e = e.replace(/"/g, "'"), e = e.replace(/&/g, "&"),
e = e.replace(/&lt;/g, "<"), e = e.replace(/&gt;/g, ">");
}
function l(e) {
return e = e.replace(/&OElig;/g, "Œ"), e = e.replace(/&oelig;/g, "œ"), e = e.replace(/&Scaron;/g, "Š"),
e = e.replace(/&scaron;/g, "š"), e = e.replace(/&Yuml;/g, "Ÿ"), e = e.replace(/&fnof;/g, "ƒ"),
e = e.replace(/&circ;/g, "ˆ"), e = e.replace(/&tilde;/g, "˜"), e = e.replace(/&ensp;/g, ""),
e = e.replace(/&emsp;/g, ""), e = e.replace(/&thinsp;/g, ""), e = e.replace(/&zwnj;/g, ""),
e = e.replace(/&zwj;/g, ""), e = e.replace(/&lrm;/g, ""), e = e.replace(/&rlm;/g, ""),
e = e.replace(/&ndash;/g, ""), e = e.replace(/&mdash;/g, "—"), e = e.replace(/&lsquo;/g, ""),
e = e.replace(/&rsquo;/g, ""), e = e.replace(/&sbquo;/g, ""), e = e.replace(/&ldquo;/g, "“"),
e = e.replace(/&rdquo;/g, "”"), e = e.replace(/&bdquo;/g, "„"), e = e.replace(/&dagger;/g, "†"),
e = e.replace(/&Dagger;/g, "‡"), e = e.replace(/&bull;/g, "•"), e = e.replace(/&hellip;/g, "…"),
e = e.replace(/&permil;/g, "‰"), e = e.replace(/&prime;/g, ""), e = e.replace(/&Prime;/g, "″"),
e = e.replace(/&lsaquo;/g, ""), e = e.replace(/&rsaquo;/g, ""), e = e.replace(/&oline;/g, "‾"),
e = e.replace(/&euro;/g, "€"), e = e.replace(/&trade;/g, "™"), e = e.replace(/&larr;/g, "←"),
e = e.replace(/&uarr;/g, "↑"), e = e.replace(/&rarr;/g, "→"), e = e.replace(/&darr;/g, "↓"),
e = e.replace(/&harr;/g, "↔"), e = e.replace(/&crarr;/g, "↵"), e = e.replace(/&lceil;/g, "⌈"),
e = e.replace(/&rceil;/g, "⌉"), e = e.replace(/&lfloor;/g, "⌊"), e = e.replace(/&rfloor;/g, "⌋"),
e = e.replace(/&loz;/g, "◊"), e = e.replace(/&spades;/g, "♠"), e = e.replace(/&clubs;/g, "♣"),
e = e.replace(/&hearts;/g, "♥"), e = e.replace(/&diams;/g, "♦");
}
function p(e) {
return e = e.replace(/\r\n/g, ""), e = e.replace(/\n/g, "");
}
module.exports = {
strDiscode: function(c) {
return c = e(c), c = a(c), c = r(c), c = l(c), c = p(c);
},
urlToHttpUrl: function(e, a) {
return new RegExp("^//").test(e) && (e = a + ":" + e), e;
}
};