The version of vichan running on lainchan.org
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

22 lignes
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. }