This repository has been archived on 2024-10-25. You can view files and clone it, but cannot push or open issues or pull requests.
Sequenzia/app/assets/javascripts/init.cookie.js
2013-10-26 18:06:58 -05:00

23 lines
680 B
JavaScript
Executable File

jQuery(document).ready(function($) {
// Check if there's new dmail.
if ($.cookie('has_mail') == '1') {
$('#has-mail-notice').show();
};
// Check if there's new comment.
if ($.cookie('comments_updated') == '1') {
$('#comments-link').addClass('comments-update')
$('#comments-link').addClass('bolded');
};
// Show block/ban reason if the user is blocked/banned.
if ($.cookie('block_reason') && $.cookie('block_reason') != '') {
$('#block-reason').text($.cookie('block_reason')).show();
};
// Check if there's any pending post moderation queue.
if (parseInt($.cookie('mod_pending')) > 0) {
$('#moderate').addClass('mod-pending');
};
});