Skip to content

Instantly share code, notes, and snippets.

View LYNGMN's full-sized avatar
Make shine more!

Youngmin LYNGMN

Make shine more!
View GitHub Profile
(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 === '찾을 수 없음') {
@LYNGMN
LYNGMN / yt-autoplay-remove.user.js
Last active May 23, 2024 05:09
Remove autoplay from YouTube players embedded in webpages. 웹페이지에 삽입된 유튜브 플레이어에서 자동재생을 제거합니다.
// ==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==