Stop YouTube Shorts Auto Loop

Menghentikan video Shorts agar tidak mengulang otomatis setelah selesai

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

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

(I already have a user script manager, let me install it!)

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.

(I already have a user style manager, let me install it!)

// ==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 });
})();