This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function(){ | |
| const escapeFunc = (str) => { | |
| return (str ?? '').replace(/((http|https):\/\/[^\s]*)|([*_#\[\]()\-<>|])/g, (match, p1) => p1 ? `<${p1}>` : '\\' + match); | |
| }; | |
| const url = location.href.replace(/&.+$/, '').replace(/(www\.)?youtube\.com\/watch\?v=/, 'youtu.be/'); | |
| const videoTitle = document.querySelector('yt-formatted-string.ytd-video-primary-info-renderer:nth-child(1)')?.textContent || '찾을 수 없음'; | |
| const channelName = document.querySelector('ytd-channel-name.ytd-video-owner-renderer > div:nth-child(1) > div:nth-child(1) > yt-formatted-string:nth-child(1) > a:nth-child(1)')?.textContent || '찾을 수 없음'; | |
| if (channelName === '찾을 수 없음' || videoTitle === '찾을 수 없음') { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name YouTube Video AutoPlay Blocker | |
| // @namespace https://github.com/MinGuard/MinGuard | |
| // @version 1.1 | |
| // @description Remove autoplay from YouTube players embedded in webpages. 웹페이지에 삽입된 유튜브 플레이어에서 자동재생을 제거합니다. | |
| // @author Youngmin Lee | |
| // @match *://*/* | |
| // @grant none | |
| // @run-at document-start | |
| // ==/UserScript== |