function list_entities(type, id){ var url = "/entity_list" + '/' + type + '/' + id; return get_ajax({url: url, async: false, method: "GET", data: {_format: 'json'}})['entities'] } function list_info(type, id){ var url = "/entity_list" + '/' + type + '/' + id; return get_ajax({url: url, async: false, method: "GET", data: {_format: 'info'}}) } function list_array(type, list){ return "list:" + type + ":" + list; } var body = $('body'); body.on('click', 'a.compare_list', function(){ var type = page_entity_type().split(":")[0]; var lists = get_favourite_entity_lists()[type]; if (undefined == lists || lists.length == 0){ alert("No lists to compare with"); return false } var list_id = page_entity_list(); var type_ul = favourite_list_type_ul(type, lists).addClass("list_comparison") var buttons = $('