236 | ${exportedCheckboxHtml}
237 |
241 | ${contentHtml}
242 |
243 |
244 | `;
245 | }
246 | }
247 | }
248 |
249 | async function loadComments() {
250 | var response = [];
251 |
252 | {
253 | const getComments = sendMessageToContentscript({
254 | action: 'get comments',
255 | });
256 | response = (await getComments()) || [];
257 | }
258 |
259 | if (response.length === 0) {
260 | return false;
261 | }
262 |
263 | commentsHtml = constructCommentsHtml(response);
264 | setHtml(commentsContainer, commentsHtml);
265 |
266 | return true;
267 |
268 | function constructCommentsHtml(blocks) {
269 | return blocks.map(constructCommentHtml).join('');
270 |
271 | function constructCommentHtml({ id, contentHtml }) {
272 | return `
273 |