-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
72 lines (60 loc) · 1.81 KB
/
index.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
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
* {
box-sizing: border-box;
}
html {
height: 100%;
}
body{
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
color:rgb(49, 49, 49);
background: rgb(238,174,202);
background: radial-gradient(circle, rgba(238,174,202,1) 0%, rgba(148,187,233,1) 100%);
height: 100%;
}
.column {
float: left;
width: 50%;
padding: 10px;
}
.column h2 {
text-align: center;
}
/* Clear floats after the columns */
.row:after {
content: "";
display: table;
clear: both;
}
textarea {
width: 100%;
}
</style>
<script>
// searches for e.g.
// [18:17, 10/13/2020] Andreas Huber:
// [11:34, 26.10.2020] Mr. Germany:
const regexWhatsappDateAndName = /(\[\d+:\d+,\s(\d+[\.|\/]){2}\d+]).+:\s?/gm;
function removeNames(text){
var textareaConverted = document.getElementById("text-converted");
textareaConverted.value = text.replace(regexWhatsappDateAndName, "");
};
</script>
</head>
<body>
<div class="row">
<div class="column">
<h2>Paste Original Conversation</h2>
<textarea id="text-source" rows="38" cols="50" oninput="removeNames(this.value)"></textarea>
</div>
<div class="column">
<h2>Converted Conversation</h2>
<textarea id="text-converted" rows="38" cols="50"></textarea>
</div>
</div>
</body>
</html>