Stop YouTube Shorts Auto Loop

Menghentikan video Shorts agar tidak mengulang otomatis setelah selesai

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

You will need to install an extension such as Tampermonkey to install this script.

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name         Stop YouTube Shorts Auto Loop
// @namespace    Stop-YouTube-Shorts-Auto-Loop
// @version      1.0
// @name:id      Hentikan Auto-Loop YouTube Shorts
// @name:en      Stop YouTube Shorts Auto-Loop
// @description  Menghentikan video Shorts agar tidak mengulang otomatis setelah selesai
// @description:id  Menghentikan video Shorts agar tidak mengulang otomatis setelah selesai
// @description:en  Prevent YouTube Shorts from looping automatically when video ends
// @author       3xploiton3
// @match        *://www.youtube.com/shorts/*
// @grant        none
// ==/UserScript==

(function () {
    'use strict';

    const observer = new MutationObserver(() => {
        const video = document.querySelector('video');
        if (video) {
            video.loop = false;

            // Remove event listeners YouTube might be adding
            video.addEventListener('ended', () => {
                console.log('Video ended – loop is disabled');
                // Optional: Pause to ensure no restart
                video.pause();
            });
        }
    });

    observer.observe(document.body, { childList: true, subtree: true });
})();