(data)
| 105 | 50 > page ? ((offset += 50), page++, await run()) : d()); |
| 106 | } |
| 107 | function showResult(data) { |
| 108 | let html = Object.entries(data) |
| 109 | .map(([key, value], index) => { |
| 110 | return `<tr> |
| 111 | <td>${index}</td> |
| 112 | <td>${key}</td> |
| 113 | <td>${value}</td> |
| 114 | </tr>`; |
| 115 | }) |
| 116 | .join(""); |
| 117 | |
| 118 | openPopupWithHtml( |
| 119 | `<h1> |
| 120 | <a href="${tab.url}" target="_blank">Link sản phẩm</a> |
| 121 | </h1> |
| 122 | <table> |
| 123 | <tr> |
| 124 | <th>#</th> |
| 125 | <th>Loại</th> |
| 126 | <th>Lượt mua</th> |
| 127 | </tr> |
| 128 | ${html} |
| 129 | </table> |
| 130 | <style>${getTableStyle()}</style> |
| 131 | `, |
| 132 | 500, |
| 133 | window.screen.height |
| 134 | ); |
| 135 | } |
| 136 | |
| 137 | var count = {}, |
| 138 | offset = 0, |
no test coverage detected