summaryrefslogtreecommitdiff
path: root/js/mobile-style.js
diff options
context:
space:
mode:
authorMarcin Łabanowski <marcin@6irc.net>2013-01-02 06:05:44 +0100
committerMarcin Łabanowski <marcin@6irc.net>2013-01-02 06:05:44 +0100
commit839854ffc45c0426695912970bfdc9aa5dfac786 (patch)
treef6be1b57a80734bb562a21ca30214fc9e648869f /js/mobile-style.js
parent4972ebdc7eee11dee84506c0ce3fdd9b3d15fe28 (diff)
add js device_type variable (mobile-style.js) and make smartphone-spoiler.js use it
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";
+}