forked from leftypol/leftypol
add js device_type variable (mobile-style.js) and make smartphone-spoiler.js use it
This commit is contained in:
parent
4972ebdc7e
commit
839854ffc4
2 changed files with 10 additions and 9 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue