mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-11-29 09:44:28 +01:00
Merge branch 'master' of github.com:vichan-devel/Tinyboard
This commit is contained in:
commit
e601fb3be4
@ -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)) {
|
||||||
if(navigator.userAgent.match(/iPhone|iPod|iPad|Android|Opera Mini|Blackberry|PlayBook|Windows Phone|Tablet PC|Windows CE|IEMobile/i)) {
|
$('html').addClass("mobile-style");
|
||||||
$('html').addClass("mobile-style");
|
device_type = "mobile";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$('html').addClass("desktop-style");
|
$('html').addClass("desktop-style");
|
||||||
}
|
device_type = "desktop";
|
||||||
})
|
}
|
||||||
|
@ -6,12 +6,13 @@
|
|||||||
* Copyright (c) 2012 Michael Save <savetheinternet@tinyboard.org>
|
* Copyright (c) 2012 Michael Save <savetheinternet@tinyboard.org>
|
||||||
*
|
*
|
||||||
* Usage:
|
* Usage:
|
||||||
|
* $config['additional_javascript'][] = 'js/mobile-style.js';
|
||||||
* $config['additional_javascript'][] = 'js/smartphone-spoiler.js';
|
* $config['additional_javascript'][] = 'js/smartphone-spoiler.js';
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
onready(function(){
|
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');
|
var spoilers = document.getElementsByClassName('spoiler');
|
||||||
for(var i = 0; i < spoilers.length; i++) {
|
for(var i = 0; i < spoilers.length; i++) {
|
||||||
spoilers[i].onmousedown = function() {
|
spoilers[i].onmousedown = function() {
|
||||||
|
Loading…
Reference in New Issue
Block a user