GOG.com - Updated Thread Count in Title

Display a count of updated threads in the GOG forum list page title and icon and reload once an hour so a pinned tab can be used as an update notifier

当前为 2014-08-11 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name GOG.com - Updated Thread Count in Title
  3. // @namespace ssokolow.com
  4. // @description Display a count of updated threads in the GOG forum list page title and icon and reload once an hour so a pinned tab can be used as an update notifier
  5. // @contributionURL http://tinyurl.com/kfgayrh
  6. // @include http://www.gog.com/forum
  7. // @include https://secure.gog.com/forum
  8. // @require http://cdnjs.cloudflare.com/ajax/libs/tinycon/0.5/tinycon.min.js
  9.  
  10. // @version 2
  11. // @grant none
  12. // ==/UserScript==
  13.  
  14. var unviewed_faves = $(".topics .text:contains('My favourite topics')").parents('h2').next('.category').find('.item:not(.visited) .name a');
  15.  
  16. Tinycon.setOptions({
  17. width: 7,
  18. height: 9,
  19. font: '10px arial',
  20. colour: '#ffffff',
  21. background: '#9CC824',
  22. fallback: false
  23. });
  24. Tinycon.setBubble(unviewed_faves.length);
  25. $('title').text($('title').text() + ' (' + unviewed_faves.length + ')');
  26.  
  27. setTimeout(function() { window.location.reload(true); }, 3600 * 1000);

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址