YouTube Channels to Videos

Replaces direct channel links to go to the videos page.

  1. // ==UserScript==
  2. // @name YouTube Channels to Videos
  3. // @namespace https://www.youtube.com*
  4. // @version 0.1
  5. // @description Replaces direct channel links to go to the videos page.
  6. // @author Ovyerus
  7. // @match www.youtube.com
  8. // @grant none
  9. // @locale en
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. 'use strict';
  14.  
  15. Array.from(document.querySelectorAll('a')).filter(function(a) {
  16. return /(?:https:\/\/)?(?:www\.)?youtube\.com\/(?:c(?:hannel)?|user)\/[A-z0-9-_]+(?!\/?.+)/i.test(a.href);
  17. }).forEach(function(a) {a.href += '/videos';});
  18. })();