Source code of Leftypol imageboard
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

28 lines
715 B

/*
* smartphone-spoiler.js
* https://github.com/savetheinternet/Tinyboard-Tools/blob/master/js/smartphone-spoiler.js
*
* Released under the MIT license
* Copyright (c) 2012 Michael Save <[email protected]>
*
* Usage:
* $config['additional_javascript'][] = 'js/smartphone-spoiler.js';
*
*/
$(document).ready(function(){
/* This needs to be expanded upon: */
var is_mobile = navigator.userAgent.match(/iPhone|iPod|iPad|Android/i);
if(is_mobile) {
$('span.spoiler').each(function() {
$(this).click(function() {
if($(this).hasClass('show'))
$(this).css('color', 'black').removeClass('show');
else
$(this).css('color', 'white').addClass('show');
});
});
}
});