PC에서 크롬 브라우저 사용을 기준으로 설명드릴게요.
은은하게 편리합니다.
- 모바일 브라우저(크롬 사파리 등)나 PC 브라우저(엣지 파이어폭스 등등)에도 가능은 합니다.
설명은 크롬기준으로 드리겠습니다. 다른 브라우저는 구글링..
- 1단계
크롬 브라우저에 우측 상단 점 3개를 누르고 확장프로그램 -> 확장프로그램 관리 클릭
화면 우측 상단 모서리즘에 개발자 모드를 켜줍니다.
- 2단계
https://chromewebstore.google.com/?hl=ko
크롬 웹스토어에서 "Tampermonkey" 검색 또는 하단 링크 방문하여 크롬에 추가하기 클릭
https://chromewebstore.google.com/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo?hl=ko
- 3단계
크롬 창 우측 상단에 확장프로그램 아이콘을 누른 후 "Tampermonkey" 핀 고정 후
고정된 "Tampermonkey" 아이콘을 눌러 "새 스크립트 만들기" 클릭
- 4단계
에디터 안의 모든 내용을 선택 후 삭제하고 하단의 내용을 붙혀넣기.
// ==UserScript==
// @name Auto Skip YouTube Ads
// @name:ko YouTube 광고 자동 건너뛰기
// @namespace https://github.com/tientq64/userscripts
// @version 7.2.1
// @description Automatically skip YouTube ads instantly. Undetected by YouTube ad blocker warnings.
// @author tientq64
// @icon https://cdn-icons-png.flaticon.com/64/2504/2504965.png
// @match https://www.youtube.com/*
// @match https://m.youtube.com/*
// @match https://music.youtube.com/*
// @exclude https://studio.youtube.com/*
// @grant none
// @license MIT
// @compatible firefox
// @compatible chrome
// @compatible opera
// @compatible safari
// @compatible edge
// @noframes
// @homepage https://github.com/tientq64/userscripts/tree/main/scripts/Auto-Skip-YouTube-Ads
// @downloadURL https://update.greasyfork.org/scripts/498197/Auto%20Skip%20YouTube%20Ads.user.js
// @updateURL https://update.greasyfork.org/scripts/498197/Auto%20Skip%20YouTube%20Ads.meta.js
// ==/UserScript==function skipAd() {
if (checkIsYouTubeShorts()) return
const adShowing = document.querySelector('.ad-showing')
const pieCountdown = document.querySelector('.ytp-ad-timed-pie-countdown-container')
const surveyQuestions = document.querySelector('.ytp-ad-survey-questions')if (adShowing === null && pieCountdown === null && surveyQuestions === null) return
let playerEl
let player
if (isYouTubeMobile || isYouTubeMusic) {
playerEl = document.querySelector('#movie_player')
player = playerEl
} else {
playerEl = document.querySelector('#ytd-player')
player = playerEl && playerEl.getPlayer()
}if (playerEl === null || player === null) {
console.log({
message: 'Player not found',
timeStamp: getCurrentTimeString()
})
return
}let adVideo = null
if (pieCountdown === null && surveyQuestions === null) {
adVideo = document.querySelector(
'#ytd-player video.html5-main-video, #song-video video.html5-main-video'
)console.table({
message: 'Ad video',
video: adVideo !== null,
src: adVideo?.src,
paused: adVideo?.paused,
currentTime: adVideo?.currentTime,
duration: adVideo?.duration,
timeStamp: getCurrentTimeString()
})if (adVideo === null || !adVideo.src || adVideo.paused || isNaN(adVideo.duration)) return
console.log({
message: 'Ad video has finished loading',
timeStamp: getCurrentTimeString()
})
}if (isYouTubeMusic && adVideo !== null) {
adVideo.currentTime = adVideo.durationconsole.table({
message: 'Ad skipped',
timeStamp: getCurrentTimeString(),
adShowing: adShowing !== null,
pieCountdown: pieCountdown !== null,
surveyQuestions: surveyQuestions !== null
})
} else {
const videoData = player.getVideoData()
const videoId = videoData.video_id
const start = Math.floor(player.getCurrentTime())if ('loadVideoWithPlayerVars' in playerEl) {
playerEl.loadVideoWithPlayerVars({ videoId, start })
} else {
playerEl.loadVideoByPlayerVars({ videoId, start })
}console.table({
message: 'Ad skipped',
videoId,
start,
title: videoData.title,
timeStamp: getCurrentTimeString(),
adShowing: adShowing !== null,
pieCountdown: pieCountdown !== null,
surveyQuestions: surveyQuestions !== null
})
}
}function checkIsYouTubeShorts() {
return location.pathname.startsWith('/shorts/')
}function getCurrentTimeString() {
return new Date().toTimeString().split(' ', 1)[0]
}function addCss() {
const adsSelectors = [
'#player-ads',
'#panels > ytd-engagement-panel-section-list-renderer[target-id="engagement-panel-ads"]',
'#masthead-ad',
'.yt-mealbar-promo-renderer',
'.ytp-featured-product',
'ytd-merch-shelf-renderer',
'ytmusic-mealbar-promo-renderer',
'ytmusic-statement-banner-renderer'
]
const adsSelector = adsSelectors.join(',')
const css = `${adsSelector} { display: none !important; }`
const style = document.createElement('style')
style.textContent = css
document.head.appendChild(style)
}
function removeAdElements() {
const adSelectors = [
['ytd-reel-video-renderer', '.ytd-ad-slot-renderer']
]
for (const adSelector of adSelectors) {
const adEl = document.querySelector(adSelector[0])
if (adEl === null) continue
const neededEl = adEl.querySelector(adSelector[1])
if (neededEl === null) continue
adEl.remove()
}
}const isYouTubeMobile = location.hostname === 'm.youtube.com'
const isYouTubeMusic = location.hostname === 'music.youtube.com'
const isYouTubeDesktop = !isYouTubeMobile && !isYouTubeMusic
const isYouTubeVideo = isYouTubeMobile || isYouTubeDesktopaddCss()
if (isYouTubeVideo) {
window.setInterval(removeAdElements, 1000)
removeAdElements()
}window.setInterval(skipAd, 500)
skipAd() -
5단계
에디터 상단의 파일을 클릭하고, 첫번째 저장 버튼을 클릭
창을 모두 닫고 유튜브 접속 후 광고없는 유튜브를 즐기시면 됩니다.