The version of vichan running on lainchan.org
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.

22 line
690B

  1. /*
  2. * mobile-style.js - adds some responsiveness to Tinyboard
  3. * https://github.com/vichan-devel/Tinyboard/blob/master/js/mobile-style.js
  4. *
  5. * Released under the MIT license
  6. * Copyright (c) 2014 Marcin Łabanowski <marcin@6irc.net>
  7. *
  8. * Usage:
  9. * $config['api']['enabled'] = true;
  10. * $config['additional_javascript'][] = 'js/jquery.min.js';
  11. * $config['additional_javascript'][] = 'js/mobile-style.js';
  12. */
  13. if(navigator.userAgent.match(/iPhone|iPod|iPad|Android|Opera Mini|Blackberry|PlayBook|Windows Phone|Tablet PC|Windows CE|IEMobile/i)) {
  14. $('html').addClass("mobile-style");
  15. device_type = "mobile";
  16. }
  17. else {
  18. $('html').addClass("desktop-style");
  19. device_type = "desktop";
  20. }