File tree 3 files changed +6
-12
lines changed
3 files changed +6
-12
lines changed Original file line number Diff line number Diff line change 7
7
< title > Document</ title >
8
8
</ head >
9
9
< 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 " />
13
13
14
14
< button class ="button hidden " id ="copy "> Copy to clipboard</ button >
15
15
16
- < pre style ="white-space: pre " id ="klmContent "> </ pre >
16
+ < pre style ="white-space: pre " id ="kmlContent "> </ pre >
17
17
</ body >
18
18
< footer > made by < a href ="http://emre.ca " target ="_blank "> Emre</ a > </ footer >
19
19
< script type ="module " src ="main.js "> </ script >
Original file line number Diff line number Diff line change @@ -34,17 +34,14 @@ const handleFiles = (e) => {
34
34
convertedData . push ( data ) ;
35
35
} ) ;
36
36
content . innerHTML = JSON . stringify ( convertedData , null , 4 ) ;
37
- console . log ( convertedData ) ;
38
37
copyBtn . classList . remove ( "hidden" ) ;
39
38
} ,
40
39
false
41
40
) ;
42
41
43
- if ( file ) {
44
- reader . readAsText ( file ) ;
45
- }
42
+ if ( file ) reader . readAsText ( file ) ;
46
43
} ;
47
- const content = document . querySelector ( "#klmContent " ) ;
44
+ const content = document . querySelector ( "#kmlContent " ) ;
48
45
const inputElement = document . getElementById ( "inputElement" ) ;
49
46
inputElement . addEventListener ( "change" , handleFiles , false ) ;
50
47
Original file line number Diff line number Diff line change @@ -24,9 +24,6 @@ input[type="file"] {
24
24
border-radius : 15px ;
25
25
}
26
26
27
- input [type = "file" ] button {
28
- }
29
-
30
27
body {
31
28
margin-top : 30px ;
32
29
display : flex;
You can’t perform that action at this time.
0 commit comments