We had Prettier pinned because of https://github.com/prettier/prettier/issues/5529. Since that bug is fixed, unpinning. Prettier now supports YAML, so this applies Prettier to all .yml except for translations, which should not be edited directly anyway.
16 lines
342 B
JavaScript
16 lines
342 B
JavaScript
// for android we test webkit
|
|
var hiddenProperty =
|
|
document.hidden !== undefined
|
|
? "hidden"
|
|
: document.webkitHidden !== undefined
|
|
? "webkitHidden"
|
|
: undefined;
|
|
|
|
export default function() {
|
|
if (hiddenProperty !== undefined) {
|
|
return !document[hiddenProperty];
|
|
} else {
|
|
return document && document.hasFocus;
|
|
}
|
|
}
|