MCPcopy Create free account
hub / github.com/Useful-Scripts-Extension/useful-script / showResult

Function showResult

scripts/shopee_topVariation.js:107–135  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

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,

Callers 1

dFunction · 0.70

Calls 2

openPopupWithHtmlFunction · 0.85
getTableStyleFunction · 0.85

Tested by

no test coverage detected