#1
 GyGu

GyGu
Membro
JS

Código:
jQuery(function() {
   if(jQuery('#user_navigation li a[href*="/login?logout=1"]').length) {
      jQuery.get('/profile?mode=editprofile&page_profil=notifications', function(data) {
         not1 = jQuery('form[name="notif_opts"] + .main-head.clearfix p.h2:contains(" notificação")', data).text();
         not2 = jQuery('form[name="notif_opts"] + .main-head.clearfix p.h2:contains(" notificações")', data).text();
         if(not1.length) {
            notifs = not1.split(' notificação').join('');
         } else if(not2.length) {
            notifs = not2.split(' notificações').join('');
         } else {
            notifs = "0";
         }
         jQuery('li a#notify_link').append('<b id="onnots">'+notifs+'</b>');
         if($('#onnots').text() == 0) {
           $('#onnots').remove();
         }
      });
   }
   jQuery('a#notify_link').click(function() {
      jQuery(this).toggleClass('focused');
      jQuery('#fa_toolbar #fa_right').toggleClass('notification');
      return false;
   });
});
function onnots() {
   jQuery.get('/forum', function(date) {
      nots = jQuery('#notif_list', data).find('li.unread').size();
      jQuery('#onnots').text(nots);
   });
}
setInterval('onnots()', 120000);

CSS




Código:
#fa_toolbar {height: 0px !important;}
#notif_list {left: 31% !important;top: 141px !important;}
a#notify_link {position: relative;}
a#notify_link.focused {background: url(http://i.imgur.com/aAt9Y1u.png) 0px 1px repeat-x rgb(64, 64, 64);}
#onnots {background: rgb(216, 10, 10);border-radius: 3px;box-shadow: rgba(0, 0, 0, 0.278431) -1px 1px 0px;display: inline-block;font-size: 11px;right: 8px;line-height: 10px;padding: 3px;position: absolute;text-align: center;top: 3px;}
#fa_toolbar {display: block !important;visibility: visible !important;}
#fa_toolbar, #fa_toolbar * {visibility: hidden !important;}
#fa_toolbar #fa_right.notification #notif_list, #fa_toolbar #fa_right.notification #notif_list * {visibility: visible !important;}
#fa_left * {width: 0 !important;height: 0 !important;font-size: 0 !important;}
body #fa_toolbar * {display: none !important;}
body #fa_toolbar * {visibility: visible !important;}
body #fa_toolbar #fa_right,body #fa_toolbar #fa_right.notification #notif_list,body #fa_toolbar #fa_right.notification #notif_list li,body #fa_toolbar #fa_right.notification #notif_list li .content,body #fa_toolbar #fa_right.notification #notif_list li .content .contentText {display: block !important;}
body #fa_toolbar #fa_right.notification #notif_list li a {display: inline-block !important;}




body #fa_toolbar {display: none;}