Skip to content

Commit f6745e4

Browse files
authored
Add index.html
1 parent 801856a commit f6745e4

1 file changed

Lines changed: 110 additions & 0 deletions

File tree

index.html

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<!-- Required meta tags -->
5+
<meta charset="utf-8">
6+
<meta name="viewport" content="width=device-width, initial-scale=1">
7+
8+
<!-- Bootstrap CSS -->
9+
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-giJF6kkoqNQ00vy+HMDP7azOuL0xtbfIcaT9wjKHr8RbDVddVHyTfAAsrekwKmP1" crossorigin="anonymous">
10+
11+
<title>Hello, world!</title>
12+
13+
<script>
14+
function process() {
15+
16+
var listRegexFrom = [
17+
[String.raw`^(?!<div class='highlight'>).+`,``],
18+
[String.raw`<div class='highlight'>`,``],
19+
[String.raw`</div>`,``] ,
20+
[String.raw`^(?:[\t ]*(?:\r?\n|\r))+`,``],
21+
[String.raw`&nbsp;`,``],
22+
[String.raw`&#10;`,` `],
23+
[String.raw`&#13;`,` `],
24+
[String.raw`&#8217;`,`'`],
25+
[String.raw`&#233;`,`è`],
26+
[String.raw`&#224;`,`à`],
27+
[String.raw`&#242;`,`ò`],
28+
[String.raw`&#249;`,`ù`],
29+
[String.raw`&#232;`,`è`],
30+
[String.raw`&#171;`,``],
31+
[String.raw`&#187;`,``],
32+
[String.raw`&#8211;`,``],
33+
[String.raw`&#236;`,`i`],
34+
[String.raw`&#8220;`,``],
35+
[String.raw`&#8221;`,``],
36+
[String.raw`&#236;`,``],
37+
[String.raw`&#236;`,``],
38+
[String.raw` `,` `],
39+
[String.raw` `,` `],
40+
];
41+
42+
document.getElementById("output").value = " "
43+
let output = document.getElementById("input").value
44+
45+
listRegexFrom.forEach(function(regexFrom) {
46+
//alert(regexFrom[0]);
47+
//alert(regexFrom[1]);
48+
output = output.replace(new RegExp(regexFrom[0], "mg"), regexFrom[1]);
49+
//alert(output)
50+
document.getElementById("output").value = output
51+
52+
});
53+
54+
55+
56+
}
57+
</script>
58+
59+
</head>
60+
61+
62+
<body>
63+
64+
65+
66+
<div class="container">
67+
<div class="row">
68+
<div class="col-sm">
69+
<h1>Lithium Ebook Highlighted Text Extractor</h1>
70+
</div>
71+
</div>
72+
<div class="row">
73+
<div class="col-sm">
74+
<div class="mb-3">
75+
<label for="exampleFormControlTextarea1" class="form-label">Input (Paste HTML exported from Lithium here)</label>
76+
<textarea id="input" class="form-control" id="exampleFormControlTextarea1" rows="3"></textarea>
77+
</div>
78+
</div>
79+
</div>
80+
81+
<div class="row">
82+
<div class="col-sm">
83+
<div class="mb-3">
84+
<label for="exampleFormControlTextarea1" class="form-label">Output (Press process button to extract text)</label>
85+
<textarea id="output" class="form-control" id="exampleFormControlTextarea1" rows="3"></textarea>
86+
</div>
87+
</div>
88+
</div>
89+
90+
91+
<div class="row">
92+
<div class="col-sm">
93+
<div class="mb-3">
94+
<button type="button" class="btn btn-success btn-lg" onclick="process()">Process</button>
95+
</div>
96+
</div>
97+
</div>
98+
99+
100+
101+
</div>
102+
103+
104+
105+
106+
107+
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/js/bootstrap.bundle.min.js" integrity="sha384-ygbV9kiqUc6oa4msXn9868pTtWMgiQaeYH7/t7LECLbyPA2x65Kgf80OJFdroafW" crossorigin="anonymous"></script>
108+
109+
</body>
110+
</html>

0 commit comments

Comments
 (0)