not really known
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.4 KiB

  1. // Copyright (C) 2015 Sam Parkinson
  2. // This program is free software; you can redistribute it and/or
  3. // modify it under the terms of the The GNU Affero General Public
  4. // License as published by the Free Software Foundation; either
  5. // version 3 of the License, or (at your option) any later version.
  6. //
  7. // You should have received a copy of the GNU Affero General Public
  8. // License along with this library; if not, write to the Free Software
  9. // Foundation, 51 Franklin Street, Suite 500 Boston, MA 02110-1335 USA
  10. //
  11. window.platform = {
  12. android: /Android/i.test(navigator.userAgent),
  13. FF: /Firefox/i.test(navigator.userAgent),
  14. mobile: /Mobi/i .test(navigator.userAgent),
  15. tablet: /Tablet/i .test(navigator.userAgent)
  16. }
  17. platform.androidWebkit = platform.android && !platform.FF;
  18. platform.FFOS = platform.FF
  19. && (platform.mobile || platform.tablet)
  20. && !platform.android;
  21. console.log('On platform: ', platform);
  22. window.platformColor = {
  23. header: platform.FF? '#2584af' : '#2584af', // 2.5B 5/10
  24. doHeaderShadow: !platform.FF,
  25. background: platform.FF? '#92b5c8' : '#92b5c8' // 2.5B 7/4
  26. }
  27. document.querySelector('meta[name=theme-color]')
  28. .content = platformColor.header;
  29. function showButtonHighlight(x, y, r, event, scale, stage) {
  30. if (platform.FFOS) return {};
  31. return showMaterialHighlight(x, y, r, event, scale, stage);
  32. }