Skip to content

Commit 8484748

Browse files
committed
new hack for safari detection (old trick not working for newer safari)
1 parent 340cfcb commit 8484748

2 files changed

Lines changed: 26 additions & 0 deletions

File tree

apps/notation_kb/index.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,19 @@
5050
display: block;
5151
}
5252
}}
53+
/* https://chrislachance.com/new-css-hacks-to-target-safari/ */
54+
/* iOS browsers */
55+
@supports(font:-apple-system-body) and (-webkit-touch-callout:default){
56+
#audio_enabler {
57+
display: block;
58+
}
59+
}
60+
/* Desktop Safari */
61+
@supports(font:-apple-system-body) and (not(-webkit-touch-callout:default)){
62+
#audio_enabler {
63+
display: block;
64+
}
65+
}
5366
</style>
5467
<script src='https://surikov.github.io/webaudiofont/npm/dist/WebAudioFontPlayer.js'></script>
5568
<script>

apps/notation_viewer/index.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,19 @@
5050
display: block;
5151
}
5252
}}
53+
/* https://chrislachance.com/new-css-hacks-to-target-safari/ */
54+
/* iOS browsers */
55+
@supports(font:-apple-system-body) and (-webkit-touch-callout:default){
56+
#audio_enabler {
57+
display: block;
58+
}
59+
}
60+
/* Desktop Safari */
61+
@supports(font:-apple-system-body) and (not(-webkit-touch-callout:default)){
62+
#audio_enabler {
63+
display: block;
64+
}
65+
}
5366
</style>
5467
<script src='https://surikov.github.io/webaudiofont/npm/dist/WebAudioFontPlayer.js'></script>
5568
<script>

0 commit comments

Comments
 (0)