sbd-npm 1.4.45 → 1.4.46
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.
- package/package.json +1 -1
- package/status.js +21 -13
- package/util.js +2 -2
package/package.json
CHANGED
package/status.js
CHANGED
@@ -235,7 +235,7 @@ $(function () {
|
|
235
235
|
}
|
236
236
|
Util.post(location.pathname, {active_div: localStorage[Status.tab_token]}, function (j) {
|
237
237
|
let html = [], ip_num = j["num"];
|
238
|
-
$("#ip_num").html("共 <span class='label label-info'>" + j["num"] + "</span> 条");
|
238
|
+
$("#ip_num").html("共 <span class='label label-info'>" + j["num"] + "</span> 条(" + j["total_ip_num"] + ")");
|
239
239
|
j["data"].forEach(function (item) {
|
240
240
|
html.push("<tr>");
|
241
241
|
html.push("<td>", ip_num, "</td>");
|
@@ -755,14 +755,17 @@ $(function () {
|
|
755
755
|
"head_cols": head_cols
|
756
756
|
});
|
757
757
|
$("#word_recite").click(function() {
|
758
|
-
|
759
|
-
|
760
|
-
|
761
|
-
|
762
|
-
window.speechSynthesis.onvoiceschanged = () => {
|
763
|
-
let voices = window.speechSynthesis.getVoices();
|
758
|
+
if (!Util.is_load) {
|
759
|
+
Util.is_load = true;
|
760
|
+
let voices = window.speechSynthesis.getVoices();
|
761
|
+
if (voices.length > 0) {
|
764
762
|
Status.show_speech_voices(voices);
|
765
|
-
}
|
763
|
+
} else {
|
764
|
+
window.speechSynthesis.onvoiceschanged = () => {
|
765
|
+
let voices = window.speechSynthesis.getVoices();
|
766
|
+
Status.show_speech_voices(voices);
|
767
|
+
};
|
768
|
+
}
|
766
769
|
}
|
767
770
|
});
|
768
771
|
Status.init_word_modal();
|
@@ -771,11 +774,16 @@ $(function () {
|
|
771
774
|
},
|
772
775
|
|
773
776
|
show_speech_voices: function(voices) {
|
774
|
-
|
775
|
-
|
776
|
-
|
777
|
-
|
778
|
-
|
777
|
+
if (voices.length > 0) {
|
778
|
+
let data = [];
|
779
|
+
voices.forEach(voice => {
|
780
|
+
data.push(`Name: ${voice.name}, Lang: ${voice.lang}, Default: ${voice.default}`);
|
781
|
+
});
|
782
|
+
alert(data.join("\n"));
|
783
|
+
} else {
|
784
|
+
alert("空列表: []");
|
785
|
+
}
|
786
|
+
Util.is_load = false;
|
779
787
|
},
|
780
788
|
|
781
789
|
init_machine_action_modal: function () {
|
package/util.js
CHANGED
@@ -3287,9 +3287,9 @@ const Util = {
|
|
3287
3287
|
pack_index_data: function (index, change) {
|
3288
3288
|
let index_html = Util.to_float(index, 2);
|
3289
3289
|
if (change > 0) {
|
3290
|
-
|
3290
|
+
return "<b class='text-danger'>" + index_html + "(+" + change + "%)</b>";
|
3291
3291
|
} else if (change < 0) {
|
3292
|
-
|
3292
|
+
return "<b class='text-success'>" + index_html + "(" + change + "%)</b>";
|
3293
3293
|
}
|
3294
3294
|
return index_html;
|
3295
3295
|
},
|