deploy: b2e4f1bc64
				
					
				
			This commit is contained in:
		
							parent
							
								
									ccaeb783f8
								
							
						
					
					
						commit
						4f85667529
					
				
					 2 changed files with 32 additions and 4 deletions
				
			
		|  | @ -43,7 +43,7 @@ eval("\"use strict\";\n// Instantiate WebAssembly module\nvar wasmExports = __we | |||
| /***/ (function(module, __webpack_exports__, __webpack_require__) { | ||||
| 
 | ||||
| "use strict"; | ||||
| eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var gpx_web_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! gpx-web-utils */ \"../pkg/gpx_web_utils.js\");\n\n\nconst inputElement = document.getElementById(\"input\");\n\ninputElement.addEventListener(\"change\", readFiles, false);\n\nfunction readFiles() {\n  if (inputElement.files.length < 2) { alert(\"open two or more files\"); return; }\n\n  const files = Array.from(inputElement.files);\n  const promises = files.map(f => f.text());\n\n  Promise.all(promises).then(gpxes => {\n    const merged = gpx_web_utils__WEBPACK_IMPORTED_MODULE_0__[\"merge\"](gpxes);\n    writeOutput(merged);\n    inputElement.value = \"\";\n  });\n}\n\nfunction writeOutput(file) {\n    const blob = new Blob([file], {type: \"text/gpx\"});\n    const a = document.createElement(\"a\");\n    a.href = URL.createObjectURL(blob);\n    a.download = \"merged.gpx\";\n    a.click();\n    URL.revokeObjectURL(a.href);\n}\n\n\n//# sourceURL=webpack:///./index.js?"); | ||||
| eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var gpx_web_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! gpx-web-utils */ \"../pkg/gpx_web_utils.js\");\n\n\nconst inputElement = document.getElementById(\"gpxInput\");\n\ninputElement.addEventListener(\"change\", readFiles, false);\n\nfunction readFiles() {\n  if (inputElement.files.length < 2) { alert(\"open two or more files\"); return; }\n\n  const files = Array.from(inputElement.files);\n  const promises = files.map(f => f.text());\n\n  Promise.all(promises).then(gpxes => {\n    const merged = gpx_web_utils__WEBPACK_IMPORTED_MODULE_0__[\"merge\"](gpxes);\n    writeOutput(merged);\n    inputElement.value = \"\";\n  });\n}\n\nfunction writeOutput(file) {\n    const blob = new Blob([file], {type: \"text/gpx\"});\n    const a = document.createElement(\"a\");\n    a.href = URL.createObjectURL(blob);\n    a.download = \"merged.gpx\";\n    a.click();\n    URL.revokeObjectURL(a.href);\n}\n\n\n//# sourceURL=webpack:///./index.js?"); | ||||
| 
 | ||||
| /***/ }), | ||||
| 
 | ||||
|  |  | |||
							
								
								
									
										34
									
								
								index.html
									
										
									
									
									
								
							
							
						
						
									
										34
									
								
								index.html
									
										
									
									
									
								
							|  | @ -2,11 +2,39 @@ | |||
| <html> | ||||
|   <head> | ||||
|     <meta charset="utf-8"> | ||||
|     <title>gpx web utils</title> | ||||
|     <title>gpx.thermokar.st</title> | ||||
|     <meta name="viewport" content="width=device-width, initial-scale=1"> | ||||
|     <style> | ||||
|       body { | ||||
|         max-width: 35em; | ||||
|         margin: 0 auto; | ||||
|         line-height: 1.5; | ||||
|         font-family: Arial, Helvetica, sans-serif; | ||||
|         font-size: large; | ||||
|       } | ||||
|     </style> | ||||
|   </head> | ||||
|   <body> | ||||
|     <noscript>This page contains webassembly and javascript content, please enable javascript in your browser.</noscript> | ||||
|     <input id="input" type="file" multiple> | ||||
|     <noscript> | ||||
|       This page contains webassembly and javascript content, please enable | ||||
|       javascript in your browser. | ||||
|     </noscript> | ||||
|     <h1> | ||||
|       <a href="https://gpx.thermokar.st">gpx.thermokar.st</a> | ||||
|     </h1> | ||||
|     <span> | ||||
|       This client-side tool is for merging | ||||
|       <a href="https://www.topografix.com/gpx.asp">GPX files</a>. | ||||
|       Please note, this has only been tested on GPX files produced by | ||||
|       <a href="https://www.garmin.com">Garmin</a> and | ||||
|       <a href="https://www.strava.com">Strava</a> - your mileage may vary. | ||||
|       Source: | ||||
|       <a href="https://github.com/thermokarst/gpx-web-utils"> | ||||
|         https://github.com/thermokarst/gpx-web-utils</a> | ||||
|     </span> | ||||
|     <form> | ||||
|       <input id="gpxInput" type="file" multiple> | ||||
|     </form> | ||||
|     <script src="./bootstrap.js"></script> | ||||
|   </body> | ||||
| </html> | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 thermokarst
						thermokarst