🏠 返回首頁 

Greasy Fork is available in English.

Kill YouTube Channel Video Autoplay

Tuez la lecture automatique sur la chaîne YouTube et les pages utilisateur


Installer ce script?
  1. // ==UserScript==
  2. // @name Kill YouTube Channel Video Autoplay
  3. // @name:de Kill YouTube Channel Video Autoplay
  4. // @name:en Kill YouTube Channel Video Autoplay
  5. // @name:es Kill YouTube Channel Video Autoplay
  6. // @name:it Kill YouTube Channel Video Autoplay
  7. // @name:ja Kill YouTube Channel Video Autoplay
  8. // @name:fr Kill YouTube Channel Video Autoplay
  9. // @name:ko Kill YouTube Channel Video Autoplay
  10. // @name:pl Kill YouTube Channel Video Autoplay
  11. // @name:ru Kill YouTube Channel Video Autoplay
  12. // @name:zh Kill YouTube Channel Video Autoplay
  13. // @namespace killYouTubeChannelVideoAutoplay
  14. // @version 0.3
  15. // @description Kill autoplay on YouTube channel and user pages
  16. // @description:de Beenden Sie die automatische Wiedergabe auf dem YouTube-Kanal und den Benutzerseiten
  17. // @description:en Kill autoplay on YouTube channel and user pages
  18. // @description:es Elimina la reproducción automática en el canal de YouTube y en las páginas del usuario
  19. // @description:it Uccidi la riproduzione automatica sul canale YouTube e sulle pagine utente
  20. // @description:ja YouTubeチャンネルとユーザーページの自動再生を終了する
  21. // @description:fr Tuez la lecture automatique sur la chaîne YouTube et les pages utilisateur
  22. // @description:ko YouTube 채널 및 사용자 페이지에서 자동 재생 중지
  23. // @description:pl Zabij autoodtwarzanie na kanale YouTube i stronach użytkowników
  24. // @description:ru Убирает автозапуск видео на страницах канала и пользователя на YouTube
  25. // @description:zh 终止YouTube频道和用户页面上的自动播放
  26. // @author Blank
  27. // @match https://www.youtube.com/*
  28. // @run-at document-start
  29. // @grant none
  30. // @noframes
  31. // ==/UserScript==
  32. (function main() {
  33. 'use strict';
  34. document.createElement = new Proxy(document.createElement, {
  35. apply(target, that, args) {
  36. if (args[0]?.toLowerCase() !== 'video') return Reflect.apply(target, that, args);
  37. const video = Reflect.apply(target, that, args);
  38. video.addEventListener('loadstart', () => {
  39. const channel = document.querySelector('ytd-channel-video-player-renderer');
  40. if (channel?.contains(video)) video.pause();
  41. }, { passive: true });
  42. return video;
  43. },
  44. });
  45. }());