Last active
May 13, 2017 19:50
-
-
Save quantenProjects/a8bec030dd9734fe3652 to your computer and use it in GitHub Desktop.
Greasemonkey Exportscript für die Blitzanalyse auf http://kachelmannwetter.com/de/blitze
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Zeit und Datum auswählen, dann in den gewünschten Bereich in der Karte klicken. Ein Fenster öffnet sich und zeigt die Blitzdetails an. Dieses wieder schließen und am Ende der Seite auf Export klicken. Dann den Inhalt des Textfeldes kopieren und in eine Datei mit Endung .gpx schreiben. Als Name wird die Stromstärke angegeben |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Blitze GPX export | |
// @namespace flashexport | |
// @include https://kachelmannwetter.com/de/blitze/* | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
function flashexport() { | |
//alert("a"); | |
var exportstr = '<?xml version="1.0" encoding="UTF-8" standalone="no" ?>' + "\n" + '<gpx version="1.1" creator="Bitzexporter">' + "\n"; | |
for (i in json_return.blitzlist) { | |
exportstr += '<wpt lat="' + json_return.blitzlist[i].lat + '" lon="'+ json_return.blitzlist[i].lon + '"><name>' + Math.round(json_return.blitzlist[i].current.replace(/\s/g, "")) +" kA</name></wpt>\n"; | |
//+ Math.round(json_return.blitzlist[i].error*1000)+ "\n"; | |
} | |
//alert(exportstr); | |
exportstr += "</gpx>"; | |
document.getElementById("flash").value = exportstr; | |
}; | |
var input=document.createElement("input"); | |
input.type="button"; | |
input.value="export"; | |
input.onclick = flashexport; | |
document.body.appendChild(input); | |
function showAlert() | |
{ | |
alert("Hello World"); | |
} | |
var newHTML = document.createElement ('div'); | |
newHTML.innerHTML = ' \ | |
<div id="flashcontroll"> \ | |
<textarea id="flash" rows="10" cols="50"></textarea>\ | |
</div> \ | |
'; | |
document.body.appendChild (newHTML); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment