forked from MapComplete/MapComplete
Huge refactorings of JSON-parsing and Tagsfilter, other cleanups, warning cleanups and lots of small subtle bugfixes
This commit is contained in:
parent
9a5b35b9f3
commit
a57b7d93fa
113 changed files with 1565 additions and 2594 deletions
|
@ -43,7 +43,7 @@ export class Imgur {
|
|||
const apiUrl = 'https://api.imgur.com/3/image/'+hash;
|
||||
const apiKey = '7070e7167f0a25a';
|
||||
|
||||
var settings = {
|
||||
const settings = {
|
||||
async: true,
|
||||
crossDomain: true,
|
||||
processData: false,
|
||||
|
@ -86,7 +86,7 @@ export class Imgur {
|
|||
const apiUrl = 'https://api.imgur.com/3/image';
|
||||
const apiKey = '7070e7167f0a25a';
|
||||
|
||||
var settings = {
|
||||
const settings = {
|
||||
async: true,
|
||||
crossDomain: true,
|
||||
processData: false,
|
||||
|
@ -99,7 +99,7 @@ export class Imgur {
|
|||
},
|
||||
mimeType: 'multipart/form-data',
|
||||
};
|
||||
var formData = new FormData();
|
||||
const formData = new FormData();
|
||||
formData.append('image', blob);
|
||||
formData.append("title", title);
|
||||
formData.append("description", description)
|
||||
|
|
|
@ -23,7 +23,7 @@ export class Wikimedia {
|
|||
"api.php?action=query&prop=imageinfo&iiprop=extmetadata&" +
|
||||
"titles=" + filename +
|
||||
"&format=json&origin=*";
|
||||
$.getJSON(url, function (data, status) {
|
||||
$.getJSON(url, function (data) {
|
||||
const licenseInfo = new LicenseInfo();
|
||||
const license = data.query.pages[-1].imageinfo[0].extmetadata;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue