Greasy Fork is available in English.

BYTS(Better YouTube Shorts) - Greasyfork Edition

Gives you a seekbar, autoplay option, volume options, etc.

< BYTS(Better YouTube Shorts) - Greasyfork Edition 피드백

질문/댓글

§
작성: 2023-11-11
수정: 2023-11-11


// @match *://*.youtube.com
// @match *://*.youtube.com/*
// @match *://*.youtu.be
// @match *://*.youtu.be/*


var oldHrefz = document.location.href;
window.onload = function() {
var bodyList = document.querySelector("body")
var observer = new MutationObserver(function(mutations) {
mutations.forEach(function(mutation) {
if (oldHrefz != document.location.href) {
oldHrefz = document.location.href;
if(oldHrefz.indexOf('/shorts/') != -1 && !loaded){
var checkExist = setInterval(() => {
if ($('ytd-shorts').length && $('.html5-video-player').length) {
clearInterval(checkExist);

LoadSettings();
loaded = true;
setInterval(updateVidElem, 50);

addEventListener("keydown", function (e) {
switch (e.key.toUpperCase()) {

case "ARROWLEFT":
$(vid).prop('currentTime', $(vid).prop('currentTime') - 2)
break;
case "ARROWRIGHT":
$(vid).prop('currentTime', $(vid).prop('currentTime') + 2)
break;

default:
break;
}
});
}
}, 100);
console.log('loading ytd short')
} else if(oldHrefz.indexOf('/shorts/') != -1 && loaded) {
console.log('not loading ytd short')
} else {
clearInterval(updateVidElem);
}
}
});
});

var config = {
childList: true,
subtree: true
};

observer.observe(bodyList, config);
};

§
작성: 2024-04-11

How to use this code. and can i apply for tiktok?
Thanks!

댓글 남기기

댓글을 남기려면 로그인하세요.