×
Login Register an account
Top Submissions Explore Upgoat Search Random Subverse Random Post Colorize! Site Rules
3

Shitty Life Pro Tip: Youtube "Shorts" To Standard Video URL Bookmarklet

submitted by GrayDragon to LifeProTips 1.6 yearsOct 10, 2022 23:54:10 ago (+3/-0)     (LifeProTips)

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.


8 comments block


[ - ] Kozel 2 points 1.6 yearsOct 11, 2022 00:55:39 ago (+2/-0)

that's fucking retarded just use a userscript and don't be a fag that clicks shit all the time when a computer can do it for you


// UserScript
// @name Youtube Gayfix
// @namespace Violentmonkey Scripts
// @version 1.0
// @author qwop
// @match https://.youtube.com/shorts/
// @grant none
// @run-at document-start
// /UserScript

(function() {
'use strict';
var fix = location.href.replace('?', '&');
location.href = fix.replace('shorts/', 'watch?v=');
})();

[ - ] GrayDragon [op] 1 point 1.5 yearsOct 11, 2022 05:11:14 ago (+1/-0)*

That's retarded because even if it works, it will take random websites with "short/" and replace it.

Also, have to love "use strict" with a two-line function.

E: Terrible. The more I look at it, the worse it is. Exactly where is one supposed to put this? And what the fuck is the replacement of "?" with "&" supposed to do effectively? Oh, if you have "utm" monitoring shit, we want to keep it! \O/ YEY! Go back to reddit.



[ - ] shitface9000 0 points 1.5 yearsOct 11, 2022 07:00:59 ago (+0/-0)

Nobody uses var these days

[ - ] Kozel 0 points 1.5 yearsOct 11, 2022 12:11:46 ago (+0/-0)

google userscript

[ - ] rectangle 0 points 1.5 yearsOct 11, 2022 13:14:39 ago (+0/-0)

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 '?'

[ - ] Love240 2 points 1.6 yearsOct 11, 2022 00:05:48 ago (+2/-0)

Thank you, I hate the shorts too, I tried it and it works. Also using Brave.

[ - ] GrayDragon [op] 1 point 1.6 yearsOct 11, 2022 00:23:00 ago (+1/-0)

Welcome!

[ - ] lord_nougat 1 point 1.6 yearsOct 11, 2022 00:17:06 ago (+1/-0)

This is fantastic!