Disable YouTube Shorts

Disables YouTube Shorts player on the website by redirecting to the standard player.

< Σχολιασμός για τον κώδικα Disable YouTube Shorts

Αναφορά: Κακός - ο κώδικας δεν λειτουργεί

§
Δημοσιεύτηκε: 12/08/2022

No longer works.

§
Δημοσιεύτηκε: 17/01/2023
Επεξεργάστηκε: 17/01/2023

It wasn't working until I tweaked it like that:

function replace(word1,word2){
window.location.href = window.location.href.replace(word1, word2)
}
window.addEventListener('click', function() {

replace("shorts/","watch?v=")
});
if (window.location.href.indexOf("shorts") > -1){
window.addEventListener('mouseover', function() {
replace("shorts/","watch?v=")
});
}


The first function call is for when I click on the button shorts, while the second one is if I accessed The shorts through a hyperlink.

Δημοσίευση απάντησης

Συνδεθείτε για να δημοσιεύσετε μια απάντηση.