ident = ident.toString();
$('#like-rotator-' + ident).show();
$.get('item/ignore/' + ident, function(data) {
- if (data.match(/1/)) {
- $('#ignored-' + ident).addClass('ignored');
- $('#ignored-' + ident).removeClass('unignored');
+ if (data === 1) {
+ $('#ignored-' + ident)
+ .addClass('ignored')
+ .removeClass('unignored');
$('#ignore-' + ident).addClass('hidden');
$('#unignore-' + ident).removeClass('hidden');
} else {
- $('#ignored-' + ident).addClass('unignored');
- $('#ignored-' + ident).removeClass('ignored');
+ $('#ignored-' + ident)
+ .addClass('unignored')
+ .removeClass('ignored');
$('#ignore-' + ident).removeClass('hidden');
$('#unignore-' + ident).addClass('hidden');
}