sbd-npm 1.4.37 → 1.4.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/package.json +1 -1
  2. package/status.js +12 -14
  3. package/util.js +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sbd-npm",
3
- "version": "1.4.37",
3
+ "version": "1.4.38",
4
4
  "description": "Stock Big Data",
5
5
  "author": "DHQ <dhq314@gmail.com>",
6
6
  "license": "ISC",
package/status.js CHANGED
@@ -452,20 +452,18 @@ $(function () {
452
452
  }
453
453
  Util.post(location.pathname, {active_div: localStorage[Status.tab_token]}, function (j) {
454
454
  let html = [], sysctl_num = 0;
455
- if (j["data"]) {
456
- for (let key in j["data"]) {
457
- sysctl_num++;
458
- html.push("<tr>");
459
- if (is_mobile) {
460
- html.push("<td class='text-left' style='word-break: break-all'>", key, "</td>");
461
- } else {
462
- html.push("<td>", sysctl_num, "</td>");
463
- html.push("<td class='text-right'>", key, "</td>");
464
- }
465
- html.push("<td class='text-left' style='word-break: break-all'>", j["data"][key], "</td>");
466
- html.push("</tr>");
467
- };
468
- }
455
+ j["data"].forEach(function (item) {
456
+ sysctl_num++;
457
+ html.push("<tr>");
458
+ if (is_mobile) {
459
+ html.push("<td class='text-left' style='word-break: break-all'>", item[0], "</td>");
460
+ } else {
461
+ html.push("<td>", sysctl_num, "</td>");
462
+ html.push("<td class='text-right'>", item[0], "</td>");
463
+ }
464
+ html.push("<td class='text-left' style='word-break: break-all'>", item[1], "</td>");
465
+ html.push("</tr>");
466
+ });
469
467
  Util.render_table_html("sysctl_div_body", html);
470
468
  $("#sysctl_num").html("共 <span class='label label-info'>" + sysctl_num + "</span> 条&nbsp;&nbsp;");
471
469
  Util.hide_tips();
package/util.js CHANGED
@@ -1661,7 +1661,7 @@ const Util = {
1661
1661
  j["data"].forEach(function (item) {
1662
1662
  index++;
1663
1663
  html.push("<tr>");
1664
- html.push("<td>", index, "</td>");
1664
+ html.push("<td>", Util.pack_html_link("https://api.mymemory.translated.net/get?q=" + item["word"] + "&langpair=en|zh-CN", index), "</td>");
1665
1665
  html.push("<td>", Util.pack_html_link("https://cn.bing.com/dict/search?q=" + item["word"], item["word"]), "</td>");
1666
1666
  if (is_mobile) {
1667
1667
  html.push("<td class='text-left'>", item["chinese"], "</td>");