1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-27 08:50:59 +01:00
vichan/js/smartphone-spoiler.js
czaks 7f3f05f076 add copyright notices for javascripts based on commit history
Conflicts:
	js/auto-reload.js
	js/toggle-images.js
2014-01-19 15:00:31 -05:00

25 lines
728 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>
* Copyright (c) 2013-2014 Marcin Łabanowski <marcin@6irc.net>
*
* Usage:
* $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)) {
var spoilers = document.getElementsByClassName('spoiler');
for(var i = 0; i < spoilers.length; i++) {
spoilers[i].onmousedown = function() {
this.style.color = 'white';
};
}
}
});