mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-12 09:10:30 +08:00
handle is_safari in iframe
This commit is contained in:
parent
10b8215f4e
commit
720299e386
@ -353,10 +353,17 @@ export var tools = new function() {
|
|||||||
if (/constructor/i.test(String(window["HTMLElement"]))) {
|
if (/constructor/i.test(String(window["HTMLElement"]))) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (!window.top["safari"]) {
|
let push = null;
|
||||||
return false;
|
try {
|
||||||
|
push = window.top["safari"].pushNotification;
|
||||||
|
} catch {
|
||||||
|
try {
|
||||||
|
push = window["safari"].pushNotification;
|
||||||
|
} catch {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return String(window.top["safari"].pushNotification) === "[object SafariRemoteNotification]";
|
return String(push) === "[object SafariRemoteNotification]";
|
||||||
})();
|
})();
|
||||||
|
|
||||||
// Chrome 1+
|
// Chrome 1+
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user