1/* 2 * Copyright 2016-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. 3 */ 4 5 6function addTag(rowElement, tag) { 7 var tags = $(rowElement).find('.tags'); 8 if (tags.length == 0) { 9 tags = $('<div class="tags"></div>'); 10 $(rowElement).find('td:first').append(tags); 11 } 12 tags.append('<div class="tags__tag">' + tag + '</div>') 13} 14 15$(document).ready(function () { 16 $('[data-platform]').each(function (ind, element) { 17 var platform = element.getAttribute('data-platform'); 18 addTag(element, platform) 19 }); 20}); 21