Notification Notifier attempt

1st attempt, dear god what am I trying

  1. // ==UserScript==
  2. // @name Notification Notifier attempt
  3. // @namespace Boar
  4. // @description 1st attempt, dear god what am I trying
  5. // @include *://www.thetechgame.com/*
  6. // @exclude http://www.thetechgame.com/Members_Shout.html
  7. // @version 1.3
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. $(document).ready(function() {
  12. var title = $('title').html();
  13. setInterval(function() {
  14. var noti = $('#top_notifications').html();
  15. var notinum = noti.split(' ');
  16. var num1 = notinum[0];
  17. if (num1 > 0)
  18. {
  19. document.title = '(' + num1 + ') ' + title;
  20. }
  21. else
  22. {
  23. document.title = title;
  24. }
  25. },3000);
  26. });
  27.