|
@@ -1261,6 +1261,34 @@ function addOp(text,type,time){
|
|
}, [], { "type": "POST", "withCredentials": true });
|
|
}, [], { "type": "POST", "withCredentials": true });
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+function detectBrowser() {
|
|
|
|
+ const ua = navigator.userAgent;
|
|
|
|
+
|
|
|
|
+ // 按优先级顺序检测
|
|
|
|
+ if (ua.includes("Edg/") || ua.includes("Edge/")) {
|
|
|
|
+ return "Microsoft Edge";
|
|
|
|
+ } else if (ua.includes("Firefox")) {
|
|
|
|
+ return "Mozilla Firefox";
|
|
|
|
+ } else if (ua.includes("Trident") || ua.includes("MSIE")) {
|
|
|
|
+ return "Internet Explorer";
|
|
|
|
+ } else if (ua.includes("360EE")) {
|
|
|
|
+ return "360 Browser (极速模式)";
|
|
|
|
+ } else if (ua.includes("360SE")) {
|
|
|
|
+ return "360 Browser (安全模式)";
|
|
|
|
+ } else if (ua.includes("SLBrowser")) {
|
|
|
|
+ return "QQ Browser";
|
|
|
|
+ } else if (ua.includes("UCBrowser")) {
|
|
|
|
+ return "UC Browser";
|
|
|
|
+ } else if (ua.includes("Opera") || ua.includes("OPR/")) {
|
|
|
|
+ return "Opera";
|
|
|
|
+ } else if (ua.includes("Chrome") && !ua.includes("Edg/")) {
|
|
|
|
+ return "Google Chrome";
|
|
|
|
+ } else if (ua.includes("Safari/") && !ua.includes("Chrome")) {
|
|
|
|
+ return "Safari";
|
|
|
|
+ } else {
|
|
|
|
+ return "Other Browser";
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
|
|
U.MD.D.addOp3 = async (userTime, loadTime, object, status) => {
|
|
U.MD.D.addOp3 = async (userTime, loadTime, object, status) => {
|
|
let browser = detectBrowser()
|
|
let browser = detectBrowser()
|