IT 꿀팁
광고를 허용해 주세요 없에는법 / 광고 차단 사이트 우회하는법
BBakGoSu
2025. 1. 29. 01:23
더보기
목차
- 광고 차단 프로그램
- 광고 차단 프로그램 차단 하는 사이트
- 광고 차단 프로그램 차단하는 사이트 우회
요즘 광고 차단 프로그램을 많이 사용한다.
EX) Adblock이나 Ad Guard
이런 광고 차단 프로그램을 사용하면 잘못클릭하게 되는 광고도 없애주고 쾌적한 환경에 서 WEB 서핑을 할 수 있다.
하지만 어떤 사이트에 들어가면 이렇게 뜬다.
광고 차단 프로그램 차단 사이트
이런식으로 나오고 X버튼 닫기 버튼도 없다.
광고 허용을 누르기 전에는 이러한 창을 없앨 수 없다.
해결책/광고 차단 프로그램 차단 사이트 우회
바로 Tampermonkey 를 이용하면 저 창을 없앨 수 있다.
Tampermonkey - Chrome 웹 스토어
Change the web at will with userscripts
chromewebstore.google.com
어떤 프로그램이냐면 웹사이트를 들어갈때마다 미리 설정한 JS를 자동실행 시켜주는 프로그램이다.
실행시키면 이런 창이 나오는데 이때 새 스크립트 만들기를 클릭한다.
누르면 이러한 창이 나오는데
이곳에 아래의 코드를 복사 하면 된다.
더보기
// ==UserScript==
// @name Disable Ad Popups and Restore Scrolling
// @namespace http://tampermonkey.net/
// @version 1.3
// @description Remove ad popups, overlay elements, and Google Funding Choices scripts/iframes, and restore scrolling functionality.
// @author Your Name
// @match *://*/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
// Function to remove elements by selector
function removeElementsBySelector(selector) {
const elements = document.querySelectorAll(selector);
elements.forEach(element => {
element.remove();
console.log(`Removed element matching selector: ${selector}`);
});
}
// Function to hide elements by selector using CSS
function hideElementsBySelector(selector) {
const style = document.createElement('style');
style.innerHTML = `
${selector} {
display: none !important;
visibility: hidden !important;
opacity: 0 !important;
}
`;
document.head.appendChild(style);
console.log(`Hid elements matching selector: ${selector} using CSS.`);
}
// Restore scrolling by resetting overflow on body
function restoreScrolling() {
document.body.style.overflow = 'auto';
console.log("Scrolling restored.");
}
// Remove elements that might block scrolling
function removeBlockingElements() {
const blockingElements = document.querySelectorAll('.fc-ab-root, .fc-dialog-overlay, .fc-ab-dialog');
blockingElements.forEach(element => {
element.remove();
console.log("Removed blocking element:", element);
});
}
// Remove ad-allow popup, overlay, and related elements
function removeAdPopupsAndOverlays() {
removeElementsBySelector('.fc-ab-dialog');
removeElementsBySelector('.fc-dialog-overlay');
removeElementsBySelector('.fc-ab-root');
}
// Hide ad-allow popup, overlay, and related elements using CSS
function hideAdPopupsAndOverlays() {
hideElementsBySelector('.fc-ab-dialog');
hideElementsBySelector('.fc-dialog-overlay');
hideElementsBySelector('.fc-ab-root');
}
// Remove <script> tags containing Google Funding Choices
function removeGoogleFundingScripts() {
const scripts = document.querySelectorAll('script[src*="fundingchoicesmessages.google.com"]');
scripts.forEach(script => {
script.remove();
console.log("Removed Google Funding Choices script:", script.src);
});
}
// Disable inline scripts (e.g., signalGooglefcPresent)
function overrideSetTimeout() {
const originalSetTimeout = window.setTimeout;
window.setTimeout = function(callback, delay, ...args) {
if (callback && callback.toString().includes('signalGooglefcPresent')) {
console.log("Blocked Google Funding Choices script execution.");
return; // Block the script
}
return originalSetTimeout(callback, delay, ...args);
};
}
// Remove dynamically created Google Funding Choices iframe
function observeGoogleFundingIframe() {
const observer = new MutationObserver(mutations => {
mutations.forEach(mutation => {
const addedNodes = mutation.addedNodes;
addedNodes.forEach(node => {
if (node.nodeType === 1 && node.nodeName === "IFRAME" && node.name === "googlefcPresent") {
node.remove();
console.log("Removed Google Funding Choices iframe.");
}
});
});
});
observer.observe(document.body, { childList: true, subtree: true });
}
// Observe dynamically added ad-allow popups, overlays, and related elements
function observeAdPopupsAndOverlays() {
const observer = new MutationObserver(mutations => {
mutations.forEach(mutation => {
const addedNodes = mutation.addedNodes;
addedNodes.forEach(node => {
if (node.nodeType === 1) {
if (
node.classList.contains('fc-ab-dialog') ||
node.classList.contains('fc-dialog-overlay') ||
node.classList.contains('fc-ab-root')
) {
removeAdPopupsAndOverlays(); // Or use hideAdPopupsAndOverlays() if you prefer hiding
restoreScrolling(); // Ensure scrolling is restored
}
}
});
});
});
observer.observe(document.body, { childList: true, subtree: true });
}
// Initial execution
removeAdPopupsAndOverlays();
hideAdPopupsAndOverlays();
removeGoogleFundingScripts();
restoreScrolling();
removeBlockingElements();
overrideSetTimeout();
// Start observing for dynamically added elements
observeGoogleFundingIframe();
observeAdPopupsAndOverlays();
})();
이 코드를 복사 붙여넣기 후
저장을 누르면 된다.
이후 닫기를 누르고
여기서 활성화 버튼을 누른다.
이런 식으로 적용이 되었다면 성공이다.
앞으로
"광고를 허용해 주세요"
같은 문구는 볼일이 없을 것이다.