-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
36 lines (33 loc) · 1.21 KB
/
index.html
File metadata and controls
36 lines (33 loc) · 1.21 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Tracklist Title Case Converter</title>
<script src="titleCase.js"></script>
</head>
<body>
<h2>Tracklist Title Case Converter</h2>
<p><strong>Enter Tracklist:</strong></p>
<textarea id="tracklistInput" rows="10" cols="50" oninput="convertTracklist()"></textarea><br>
<br><br>
<p><strong>Converted Tracklist:</strong></p>
<textarea id="convertedOutput" rows="10" cols="50" readonly></textarea>
<br>
<button class="copy-button" onclick="copyToClipboard()">Copy Text</button>
<script>
function convertTracklist() {
var inputText = document.getElementById('tracklistInput').value;
var convertedText = toTitleCase(inputText);
console.log(inputText)
console.log(convertedText)
document.getElementById('convertedOutput').value = convertedText;
}
function copyToClipboard() {
var textarea = document.getElementById("convertedOutput");
textarea.select();
document.execCommand("copy");
}
</script>
</body>
</html>