Open short as normal YouTube video via userscript menu

Adds button in userscript manager on YouTube shorts to open current short as normal YouTube video

  1. // ==UserScript==
  2. // @name Open short as normal YouTube video via userscript menu
  3. // @namespace https://github.com/AbdurazaaqMohammed/userscripts
  4. // @version 1.0
  5. // @description Adds button in userscript manager on YouTube shorts to open current short as normal YouTube video
  6. // @match https://www.youtube.com/shorts/*
  7. // @grant GM_registerMenuCommand
  8. // @license The Unlicense
  9. // @homepage https://github.com/AbdurazaaqMohammed/userscripts
  10. // @supportURL https://github.com/AbdurazaaqMohammed/userscripts/issues
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15.  
  16. GM_registerMenuCommand('Go To Normal Video', function () {
  17. const regularVideoUrl = window.location.href.replace('shorts/', 'watch?v=');
  18. window.location.href = regularVideoUrl;
  19. // Comment/remove the above line and uncomment the below to open in a new tab rather than replacing the current page.
  20. //window.open(regularVideoUrl);
  21. });
  22. })();