If you have an irrational hatred of YT shorts like me, you can make a new bookmark and instead of a real URL, put this in the URL textbox:
javascript:(()=[greater than sign]{window.location=window.location.toString().replace('shorts/','watch?v=')})();
(Replace the [greater than sign] with an actual greater than sign. Goofy formatting is fucking up the post and "code formatting" does not work.)
When on a short, click this bookmark and it will reload the current URL to the normal YT video format. Yeah, it is kind of useless except for folks like me.
Note: In Brave (the only browser I tested this on), the last single quote will be converted to a %27 (ASCII hex value for single quote) upon saving because it is after the question mark.
This is used with a browser extension like greasemonkey, tampermonkey... etc.
This line:
@match https://.youtube.com/shorts/
...will ensure that the script only works on: youtube.com/shorts/. It will not function on websites besides youtube.com.
I personally don't see a problem with 'use strict' here. Ensures the variables are declared..
the '?' indicates the start of a query string. Since youtube.com/watch?v= has already started the query string with v=, the next set of key/value pairs needs to be separated with a '&', not a '?'
rectangle 0 points 1.5 years ago
This is used with a browser extension like greasemonkey, tampermonkey... etc.
This line:
...will ensure that the script only works on: youtube.com/shorts/. It will not function on websites besides youtube.com.
I personally don't see a problem with 'use strict' here. Ensures the variables are declared..
the '?' indicates the start of a query string. Since youtube.com/watch?v= has already started the query string with v=, the next set of key/value pairs needs to be separated with a '&', not a '?'