-
Notifications
You must be signed in to change notification settings - Fork 0
/
含妈量检测.html
123 lines (116 loc) · 4.22 KB
/
含妈量检测.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<link rel="icon" href="https://100713.xyz/medias/Hlogo徽章.svg">
<meta name="keywords" content="静水深流, 静态页面索引, 含妈量检测, 在线含妈量检测工具, 在线工具">
<meta name="description" content="含妈量检测器,检测语句中的含妈量">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="author" content="Ethaniel">
<title>含妈量检测</title>
<!-- Google分析 -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-2PPF1NPLTJ"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-2PPF1NPLTJ');
</script>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 20px;
background-color: #f4f4f9;
}
.container {
max-width: 600px;
margin: 0 auto;
padding: 20px;
background: #ffffff;
border-radius: 8px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
h1 {
text-align: center;
color: #333;
}
textarea {
width: 100%;
height: 150px;
padding: 10px;
border: 1px solid #ddd;
border-radius: 4px;
font-size: 16px;
}
button {
display: block;
width: 100%;
padding: 10px;
margin: 10px 0;
background: #007BFF;
color: white;
border: none;
border-radius: 4px;
font-size: 16px;
cursor: pointer;
}
button:hover {
background: #0056b3;
}
.result {
margin-top: 20px;
font-size: 18px;
color: #555;
}
.highlight {
background-color: yellow;
font-weight: bold;
}
</style>
</head>
<body>
<div class="container">
<h1>含妈量检测</h1>
<textarea id="textInput" placeholder="请输入内容..."></textarea>
<button onclick="detectMa()">检测</button>
<div class="result" id="result"></div>
</div>
<script>
function detectMa() {
const inputText = document.getElementById("textInput").value;
const targetChars = [
"妈", "媽", "ma", "NM", "nm", "mom", "mama", "momma", "Mamma",
"m", "M", "🐎", "码", "泥马", "尼姆", "母", "母亲", "姆", "尼玛",
"尼马", "TM", "TMD", "NM", "Mom", "Mother", "Mum", "Maman", "Mère",
"Mutter", "Mamá", "Madre", "Mamãe", "Mãe", "お母さん", "おかあさん",
"はは", "ママ", "엄마", "eomma", "어머니", "eomeoni", "أم", "um", "ماما",
"Мать", "mat", "แม่", "mái", "มาม่า", "mā-mā", "Mẹ", "mā", "māmā", "māmī", "lǎomā",
"玛德", "nmsl", "NMSL", "草泥马", "司马", "私募"
];
let totalChars = inputText.length;
if (totalChars === 0) {
document.getElementById("result").innerHTML = "请输入内容后再检测。";
return;
}
let matchCount = 0;
let highlightedText = inputText;
targetChars.forEach(char => {
const regex = new RegExp(char, "g");
const matches = inputText.match(regex);
if (matches) {
matchCount += matches.length;
highlightedText = highlightedText.replace(regex, `<span class='highlight'>${char}</span>`);
}
});
const percentage = ((matchCount / totalChars) * 100).toFixed(2);
document.getElementById("result").innerHTML = `
<p>检测到的含妈总数:<strong>${matchCount}</strong></p>
<p>占比:<strong>${percentage}%</strong></p>
<p>检测到的妈字:</p>
<p>${highlightedText}</p>
`;
}
</script>
</body>
</html>