Github.com - Add "Watching" tab

Adds a "Watching" tab beside the "News Feed", "Pull Requests" and "Issues" tabs on the Github homepage

2014-07-08 기준 버전입니다. 최신 버전을 확인하세요.

  1. // ==UserScript==
  2. // @name Github.com - Add "Watching" tab
  3. // @namespace r-a-y/github/watching/homepage
  4. // @description Adds a "Watching" tab beside the "News Feed", "Pull Requests" and "Issues" tabs on the Github homepage
  5. // @include https://github.com/
  6. // @version 1
  7. // @grant none
  8. // ==/UserScript==
  9.  
  10. var nav = document.getElementsByClassName('pagehead-nav');
  11.  
  12. var watchingLink = document.createElement('a');
  13. watchingLink.href = '/watching';
  14. watchingLink.setAttribute( 'class', 'pagehead-nav-item' );
  15. watchingLink.innerHTML = '<span class="octicon octicon-eye"> </span> Watching';
  16.  
  17. nav[0].appendChild( watchingLink );