system-clients 1.8.32-cr → 1.8.33-cr
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
CHANGED
@@ -148,18 +148,24 @@
|
|
148
148
|
}
|
149
149
|
}
|
150
150
|
|
151
|
-
//
|
151
|
+
// 检测开发者工具
|
152
|
+
let devtools = function() {};
|
153
|
+
devtools.toString = function() {
|
154
|
+
this.opened = true;
|
155
|
+
}
|
156
|
+
|
157
|
+
// 使用更温和的检测方式
|
152
158
|
setInterval(() => {
|
153
|
-
const devtools = /./;
|
154
|
-
devtools.toString = function() {
|
155
|
-
this.opened = true;
|
156
|
-
}
|
157
159
|
console.log('%c', devtools);
|
158
160
|
if (devtools.opened) {
|
159
161
|
devtools.opened = false;
|
160
|
-
|
162
|
+
// 只在首次检测到开发者工具时刷新一次
|
163
|
+
if (!window.hasRefreshed) {
|
164
|
+
window.hasRefreshed = true;
|
165
|
+
window.location.reload();
|
166
|
+
}
|
161
167
|
}
|
162
|
-
},
|
168
|
+
}, 2000); // 降低检测频率到2秒一次
|
163
169
|
}
|
164
170
|
|
165
171
|
// 密码加密函数
|