utils.jq(() => { $(function () { const els = document.getElementsByClassName('ds-memos'); for (var i = 0; i < els.length; i++) { const el = els[i]; const api = el.getAttribute('api'); if (api == null) { continue; } const default_avatar = el.getAttribute('avatar') || def.avatar; const limit = el.getAttribute('limit'); const host = api.replace(/https:\/\/(.*?)\/(.*)/i, '$1'); // layout utils.request(el, api, function(data) { var users = []; const filter = el.getAttribute('user'); if (filter && filter.length > 0) { users = filter.split(","); } var hide = []; const hideStr = el.getAttribute('hide'); if (hideStr && hideStr.length > 0) { hide = hideStr.split(","); } data.forEach((item, i) => { if (limit && i >= limit) { return; } if (item.user && item.user.login && users.length > 0) { if (!users.includes(item.user.login)) { return; } } let date = new Date(item.createdTs * 1000) var cell = '