YouTubeRedux
YouTubeRedux copied to clipboard
[bug] page back on shorts with "hide shorts" enabled
I'm assuming it naturally comes from a redirect, but it is irritating. Maybe replacing the links themselves on youtube as well as modifying links that are directly entered in, so it still works on outside links.
I don't get it. What exactly is the issue here?
If you go to the previous page on firefox after clicking a shorts video it hitches and then goes back to the video. Apologies for late response
I think that's an issue with YouTube itself as I was able to reproduce it with Redux disabled by watching one short, scrolling to another short and then pressing back in the browser. Doesn't always happen though.
When you click on a short, and get redirected from' /shorts/' to '/watch?v=' the original url gets saved in your history, so pressing the back button leads you back to /shorts/, which gets once again redirected to '/watch?v=', I had the same issue on the first version of my redirect script, using 'location.replace' instead of 'location.href' gave the desired result, so changing the function at https://github.com/omnidevZero/YouTubeRedux/blob/master/Firefox/main.js#L951 from
function redirectShorts() {
const currentLocation = window.location.href;
const redirectLocation = currentLocation.replace('/shorts/', '/watch?v=');
window.location.href = redirectLocation;
}
to
function redirectShorts() {
const currentLocation = window.location.href;
const redirectLocation = currentLocation.replace('/shorts/', '/watch?v=');
window.location.replace(redirectLocation);
}
should fix this. (Correct me if I misinterpreted your issue)