summaryrefslogtreecommitdiff
path: root/js/smartphone-spoiler.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/smartphone-spoiler.js
parent4972ebdc7eee11dee84506c0ce3fdd9b3d15fe28 (diff)
add js device_type variable (mobile-style.js) and make smartphone-spoiler.js use it
Diffstat (limited to 'js/smartphone-spoiler.js')
-rw-r--r--js/smartphone-spoiler.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/js/smartphone-spoiler.js b/js/smartphone-spoiler.js
index 54c7a9a1..67b9c789 100644
--- a/js/smartphone-spoiler.js
+++ b/js/smartphone-spoiler.js
@@ -6,12 +6,13 @@
* Copyright (c) 2012 Michael Save <savetheinternet@tinyboard.org>
*
* Usage:
+ * $config['additional_javascript'][] = 'js/mobile-style.js';
* $config['additional_javascript'][] = 'js/smartphone-spoiler.js';
*
*/
onready(function(){
- if(navigator.userAgent.match(/iPhone|iPod|iPad|Android|Opera Mini|Blackberry|PlayBook|Windows Phone|Tablet PC|Windows CE|IEMobile/i)) {
+ if(device_type == 'mobile') {
var spoilers = document.getElementsByClassName('spoiler');
for(var i = 0; i < spoilers.length; i++) {
spoilers[i].onmousedown = function() {