lainchan/js/smartphone-spoiler.js

25 lines
621 B
JavaScript
Raw Normal View History

2012-03-29 07:16:59 -04:00
/*
* smartphone-spoiler.js
2012-03-30 20:13:11 -04:00
* https://github.com/savetheinternet/Tinyboard/blob/master/js/smartphone-spoiler.js
2012-03-29 07:16:59 -04:00
*
* Released under the MIT license
* Copyright (c) 2012 Michael Save <savetheinternet@tinyboard.org>
*
* Usage:
* $config['additional_javascript'][] = 'js/mobile-style.js';
2012-03-29 07:16:59 -04:00
* $config['additional_javascript'][] = 'js/smartphone-spoiler.js';
*
*/
onready(function(){
if(device_type == 'mobile') {
var spoilers = document.getElementsByClassName('spoiler');
for(var i = 0; i < spoilers.length; i++) {
spoilers[i].onmousedown = function() {
this.style.color = 'white';
};
}
2012-03-29 07:16:59 -04:00
}
});