YouTube - Channel redirector

Redirects the channel from featured to videos tab. Only for direct URL access.

  1. // ==UserScript==
  2. // @name YouTube - Channel redirector
  3. // @description Redirects the channel from featured to videos tab. Only for direct URL access.
  4. // @namespace var512
  5. // @author var512
  6. // @version 1.0.0
  7. // @supportURL https://gitlab.com/var512
  8. // @supportURL https://github.com/var512
  9. // @include /^https?:\/\/(www\.)?youtube\.com\/(channel|user)\/([a-zA-Z0-9_-]+)\/?(featured)?$/
  10. // @icon https://youtube.com/favicon.ico
  11. // @license MIT
  12. // @noframes
  13. // @grant none
  14. // @run-at document-start
  15. // ==/UserScript==
  16.  
  17. (() => {
  18. 'use strict';
  19.  
  20. window.stop();
  21. const newUrl = document.URL.replace(/(\/featured)?(\/)?$/, '');
  22.  
  23. window.location.replace(`${newUrl}/videos`);
  24. })();