|
@@ -474,4 +474,36 @@ function monitorAndAct(func1, func2) {
|
|
|
|
|
|
// 启动检查过程
|
|
|
checkValue();
|
|
|
-}
|
|
|
+}
|
|
|
+
|
|
|
+function showTextOnTopRight(text) {
|
|
|
+ let id1 = "showTextOnTopRight";
|
|
|
+ // 删除之前的
|
|
|
+ let oldDiv = document.getElementById(id1);
|
|
|
+ if (oldDiv) {
|
|
|
+ document.body.removeChild(oldDiv);
|
|
|
+ }
|
|
|
+ // 在屏幕右上角显示一个文本
|
|
|
+ let div = document.createElement("div");
|
|
|
+ // 设置id
|
|
|
+ div.id = id1;
|
|
|
+ div.style.position = "fixed";
|
|
|
+ div.style.top = "8px";
|
|
|
+ div.style.right = "8px";
|
|
|
+ div.style.padding = "5px";
|
|
|
+ div.style.backgroundColor = "#fff";
|
|
|
+ div.style.border = "1px solid #ccc";
|
|
|
+ div.style.borderRadius = "5px";
|
|
|
+ div.style.zIndex = "9999";
|
|
|
+ // 字体大小
|
|
|
+ div.style.fontSize = "12px";
|
|
|
+ div.innerHTML = text;
|
|
|
+ document.body.appendChild(div);
|
|
|
+}
|
|
|
+
|
|
|
+function showBusyText() {
|
|
|
+ showTextOnTopRight("同步中...");
|
|
|
+}
|
|
|
+function showDoneText() {
|
|
|
+ showTextOnTopRight("已同步");
|
|
|
+}
|