Skip to content

Commit 6d81eac

Browse files
safari dectoer
Yya stack overflow is my savior
1 parent 3643e13 commit 6d81eac

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

index.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@ let playerExtraDmg = 1;
55
let enemyExtraDmg = 1.1;
66
let moveNames = []
77
let isntFirefox = typeof InstallTrigger === 'undefined';
8-
if (isntFirefox) {
9-
alert("Please use Firefox or else the buttons commit die.")
10-
} else {
8+
let isntSafari = /constructor/i.test(window.HTMLElement) || (function (p) { return p.toString() === "[object SafariRemoteNotification]"; })(!window['safari'] || (typeof safari !== 'undefined' && window['safari'].pushNotification));
9+
isntSafari = !isntSafari
10+
11+
if (isntFirefox && isntSafari) {
12+
alert("Please use Firefox/Safari or else the buttons commit die.")
13+
} else if (!isntFirefox) {
1114
console.log("^^ that is because feature checking")
1215
};
1316
console.log("yo hi snooper if somethings red tell me ok? also run playerHp = -2")

0 commit comments

Comments
 (0)