summaryrefslogtreecommitdiff
path: root/js/mobile-style.js
diff options
context:
space:
mode:
authorMarcin Łabanowski <marcin@6irc.net>2013-01-02 07:59:24 +0100
committerMarcin Łabanowski <marcin@6irc.net>2013-01-02 07:59:24 +0100
commite6e6ab039d1a70cf0f1f5d58d7b51d068bb3fe7c (patch)
treebff5f42e487f110b2aea128946ab5aa107365d12 /js/mobile-style.js
parent1768c3d389c67d37c016e4d24de546af582f9e4d (diff)
parent839854ffc45c0426695912970bfdc9aa5dfac786 (diff)
Merge branch 'master' of github.com:vichan-devel/Tinyboard
Diffstat (limited to 'js/mobile-style.js')
-rw-r--r--js/mobile-style.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/js/mobile-style.js b/js/mobile-style.js
index 9a171da9..89e01b73 100644
--- a/js/mobile-style.js
+++ b/js/mobile-style.js
@@ -1,8 +1,8 @@
-onready(function(){
- if(navigator.userAgent.match(/iPhone|iPod|iPad|Android|Opera Mini|Blackberry|PlayBook|Windows Phone|Tablet PC|Windows CE|IEMobile/i)) {
- $('html').addClass("mobile-style");
- }
- else {
- $('html').addClass("desktop-style");
- }
-})
+if(navigator.userAgent.match(/iPhone|iPod|iPad|Android|Opera Mini|Blackberry|PlayBook|Windows Phone|Tablet PC|Windows CE|IEMobile/i)) {
+ $('html').addClass("mobile-style");
+ device_type = "mobile";
+}
+else {
+ $('html').addClass("desktop-style");
+ device_type = "desktop";
+}