GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( c6c6df...c74c01 )
by Florian
29s
created

DownloadGPX.init   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 5
rs 9.4285
c 1
b 0
f 0
1
/*jslint
2
  regexp: true
3
  indent: 4
4
*/
5
6
/*global
7
  $,
8
  document, encodeURIComponent,
9
  Markers
10
*/
11
12
var DownloadGPX = {};
13
DownloadGPX.m_map = null;
14
15
16
DownloadGPX.init = function (themap) {
17
    'use strict';
18
19
    DownloadGPX.m_map = themap;
20
};
21
22
23
DownloadGPX.initiateDownload = function () {
24
    'use strict';
25
26
    var data = '<?xml version="1.0" encoding="UTF-8" standalone="no" ?>\n';
27
    data += '<gpx xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.1" xmlns:gpxtpx="http://www.garmin.com/xmlschemas/TrackPointExtension/v1" xmlns="http://www.topografix.com/GPX/1/1" creator="Flopp\'s Map - http://flopp.net/" xmlns:wptx1="http://www.garmin.com/xmlschemas/WaypointExtension/v1" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd http://www.garmin.com/xmlschemas/GpxExtensions/v3 http://www.garmin.com/xmlschemas/GpxExtensionsv3.xsd  http://www.garmin.com/xmlschemas/WaypointExtension/v1 http://www.garmin.com/xmlschemas/WaypointExtensionv1.xsd" xmlns:gpxx="http://www.garmin.com/xmlschemas/GpxExtensions/v3">\n';
28
    data += '    <metadata>\n';
29
    data += '        <name>Export from Flopp\'s Map</name>\n';
30
    data += '    </metadata>\n';
31
    data += Markers.toXmlWpts();
32
    data += '</gpx>\n';
33
    console.log(data);
0 ignored issues
show
Debugging Code introduced by
console.log looks like debug code. Are you sure you do not want to remove it?
Loading history...
34
    var element = document.createElement('a');
35
    element.setAttribute('href', 'data:application/gpx+xml;charset=utf-8,' + encodeURIComponent(data));
36
    element.setAttribute('download', 'markers.gpx');
37
    element.style.display = 'none';
38
    document.body.appendChild(element);
39
    element.click();
40
    document.body.removeChild(element);
41
};
42