Skip to content

Commit 695159c

Browse files
committed
removed unnecessary code and fixed typos.
1 parent 3df667e commit 695159c

File tree

3 files changed

+6
-12
lines changed

3 files changed

+6
-12
lines changed

index.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
<title>Document</title>
88
</head>
99
<body>
10-
<h1>KLM TO JS</h1>
11-
<p>Converts Google Maps' .KLM files to proper JS array.</p>
12-
<input type="file" name="" id="inputElement" />
10+
<h1>KML TO JS</h1>
11+
<p>Converts Google Maps' .KML files to proper JS array.</p>
12+
<input type="file" accept=".kml" name="" id="inputElement" />
1313

1414
<button class="button hidden" id="copy">Copy to clipboard</button>
1515

16-
<pre style="white-space: pre" id="klmContent"></pre>
16+
<pre style="white-space: pre" id="kmlContent"></pre>
1717
</body>
1818
<footer>made by <a href="http://emre.ca" target="_blank">Emre</a></footer>
1919
<script type="module" src="main.js"></script>

main.js

+2-5
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,14 @@ const handleFiles = (e) => {
3434
convertedData.push(data);
3535
});
3636
content.innerHTML = JSON.stringify(convertedData, null, 4);
37-
console.log(convertedData);
3837
copyBtn.classList.remove("hidden");
3938
},
4039
false
4140
);
4241

43-
if (file) {
44-
reader.readAsText(file);
45-
}
42+
if (file) reader.readAsText(file);
4643
};
47-
const content = document.querySelector("#klmContent");
44+
const content = document.querySelector("#kmlContent");
4845
const inputElement = document.getElementById("inputElement");
4946
inputElement.addEventListener("change", handleFiles, false);
5047

style.css

-3
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ input[type="file"] {
2424
border-radius: 15px;
2525
}
2626

27-
input[type="file"] button {
28-
}
29-
3027
body {
3128
margin-top: 30px;
3229
display: flex;

0 commit comments

Comments
 (0)