Move ereader check to utility function

This commit is contained in:
Mike Colagrosso 2023-03-18 14:15:58 -06:00 committed by Alex Cabal
parent 706fd4fea0
commit e48ac5643a
2 changed files with 5 additions and 6 deletions

View file

@ -54,4 +54,8 @@ class Template{
exit();
}
public static function IsEreaderBrowser(): bool{
return isset($_SERVER['HTTP_USER_AGENT']) && (strpos($_SERVER['HTTP_USER_AGENT'], "Kobo") !== false || strpos($_SERVER['HTTP_USER_AGENT'], "Kindle") !== false);
}
}