mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-11-14 10:57:38 +01:00
24 lines
619 B
JavaScript
24 lines
619 B
JavaScript
/*
|
|
* smartphone-spoiler.js
|
|
* https://github.com/savetheinternet/Tinyboard/blob/master/js/smartphone-spoiler.js
|
|
*
|
|
* Released under the MIT license
|
|
* Copyright (c) 2012 Michael Save <savetheinternet@tinyboard.org>
|
|
*
|
|
* Usage:
|
|
* $config['additional_javascript'][] = 'js/smartphone-spoiler.js';
|
|
*
|
|
*/
|
|
|
|
onready(function(){
|
|
if(navigator.userAgent.match(/iPhone|iPod|iPad|Android|Opera Mini|Blackberry|PlayBook/i)) {
|
|
var spoilers = document.getElementsByClassName('spoiler');
|
|
for(var i = 0; i < spoilers.length; i++) {
|
|
spoilers[i].onmousedown = function() {
|
|
this.style.color = 'white';
|
|
};
|
|
}
|
|
}
|
|
});
|
|
|