utils.jq(() => { $(function () { const els = document.getElementsByClassName('ds-artalk'); for (var i = 0; i < els.length; i++) { const el = els[i]; const limit = parseInt(el.getAttribute('limit')) || 10; const api = el.getAttribute('api') + '&limit=' + limit; if (api == null) { continue; } utils.request(el, api, function (data) { data = data.data || []; data.forEach((item, i) => { var cell = '
'; cell += '
'; cell += ''; cell += '' + new Date(item.date).toLocaleString() + ''; cell += '
'; cell += ''; cell += item.content_marked; cell += ''; cell += '
'; $(el).append(cell); }); }); } }); });