Changeset View
Changeset View
Standalone View
Standalone View
fields_data.js
/** | /** | ||||
* Copyright (C) 2019 The Software Heritage developers | * Copyright (C) 2019 The Software Heritage developers | ||||
* See the AUTHORS file at the top-level directory of this distribution | * See the AUTHORS file at the top-level directory of this distribution | ||||
* License: GNU Affero General Public License version 3, or any later version | * License: GNU Affero General Public License version 3, or any later version | ||||
* See top-level LICENSE file for more information | * See top-level LICENSE file for more information | ||||
*/ | */ | ||||
"use strict"; | "use strict"; | ||||
var SPDX_LICENSES = null; | var SPDX_LICENSES = null; | ||||
var SPDX_LICENSE_IDS = null; | var SPDX_LICENSE_IDS = null; | ||||
function initSpdx() { | function initSpdx() { | ||||
var xhr = new XMLHttpRequest(); | var xhr = new XMLHttpRequest(); | ||||
xhr.open('GET', './data/spdx/licenses.json', true); | xhr.open('GET', './data/spdx/licenses.json', true); | ||||
xhr.onload = function () { | xhr.onload = function () { | ||||
if (xhr.status === 200) { | if (xhr.status === 200) { | ||||
SPDX_LICENSES = JSON.parse(xhr.response)['licenses']; | SPDX_LICENSES = JSON.parse(xhr.response)['licenses']; | ||||
var datalist = document.getElementById('licenses'); | var datalist = document.getElementById('licenses'); | ||||
Show All 30 Lines |