diff --git a/coinmanager/coinc/static/coinc/main.js b/coinmanager/coinc/static/coinc/main.js index 3c97cb9..78df12a 100644 --- a/coinmanager/coinc/static/coinc/main.js +++ b/coinmanager/coinc/static/coinc/main.js @@ -144,34 +144,32 @@ function render_response(data, td, set) { /* add or update marker (and name) if found */ if (set['found'] && set['found_by'] && set['exists']) { - div_class = set['found_by']; - $(td).find('div.coin span').html('').html('✔'); + $(td).find('div.coin span').html('').html('✔'); } - /* add/update name */ - if ([201, 202, 203].includes(data['value'])) { + /* add/update name */ + if ([201, 202, 203].includes(data['value'])) { - let c = String(value).substring(2,3); - if ('name' in data) { + let c = String(value).substring(2,3); + if ('name' in data) { - /* look for div.special123_name */ - let name = escape_html(data['name']); - let div_special_name = $(td).find('div.special' + c + '_name'); - if (div_special_name.length == 0) { + /* look for div.special123_name */ + let name = escape_html(data['name']); + let div_special_name = $(td).find('div.special' + c + '_name'); + if (div_special_name.length == 0) { - /* append div if not found */ - $(td).append('
' + name + '
'); + /* append div if not found */ + $(td).append('
' + name + '
'); - } else if (div_special_name.length == 1) { + } else if (div_special_name.length == 1) { - /* only insert inner html */ - div_special_name.html(name); - } - - /* remove name */ - } else if (!set['exists']) { - $(td).find('div.special' + c + '_name').html(); + /* only insert inner html */ + div_special_name.html(name); } + + /* remove name */ + } else if (!set['exists']) { + $(td).find('div.special' + c + '_name').html(); } }