2012-03-29 13:16:59 +02:00
|
|
|
/*
|
|
|
|
* smartphone-spoiler.js
|
2012-03-31 02:13:11 +02:00
|
|
|
* https://github.com/savetheinternet/Tinyboard/blob/master/js/smartphone-spoiler.js
|
2012-03-29 13:16:59 +02:00
|
|
|
*
|
|
|
|
* Released under the MIT license
|
|
|
|
* Copyright (c) 2012 Michael Save <savetheinternet@tinyboard.org>
|
2014-01-19 14:27:24 +01:00
|
|
|
* Copyright (c) 2013-2014 Marcin Łabanowski <marcin@6irc.net>
|
2012-03-29 13:16:59 +02:00
|
|
|
*
|
|
|
|
* Usage:
|
|
|
|
* $config['additional_javascript'][] = 'js/smartphone-spoiler.js';
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2012-03-31 10:51:25 +02:00
|
|
|
onready(function(){
|
2012-12-29 16:30:46 +01:00
|
|
|
if(navigator.userAgent.match(/iPhone|iPod|iPad|Android|Opera Mini|Blackberry|PlayBook|Windows Phone|Tablet PC|Windows CE|IEMobile/i)) {
|
2012-03-31 10:51:25 +02:00
|
|
|
var spoilers = document.getElementsByClassName('spoiler');
|
|
|
|
for(var i = 0; i < spoilers.length; i++) {
|
|
|
|
spoilers[i].onmousedown = function() {
|
|
|
|
this.style.color = 'white';
|
|
|
|
};
|
|
|
|
}
|
2012-03-29 13:16:59 +02:00
|
|
|
}
|
|
|
|
});
|
|
|
|
|