Tdgall Watermark Remover

투디갤 캡쳐방지 아이피 문구 제거

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         Tdgall Watermark Remover
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  투디갤 캡쳐방지 아이피 문구 제거
// @author       You
// @match        https://tdgall.com/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=tdgall.com
// @grant        none
// @run-at       document-end
// ==/UserScript==

(function() {
    'use strict';

    const targetText = "캡쳐방지"; // 제거할 타겟 텍스트

    function removeWatermarks() {
        // 페이지 내의 모든 div, p, span 요소를 탐색
        const elements = document.querySelectorAll('div, p, span');

        elements.forEach(el => {
            // 1. 해당 요소에 "캡쳐방지" 텍스트가 있고
            // 2. 자식 요소가 너무 많지 않은(본문 통째로 삭제 방지) 경우
            if (el.textContent.includes(targetText) && el.children.length === 0) {
                el.style.display = 'none';
                el.style.visibility = 'hidden';
                el.style.opacity = '0';
                // 필요하다면 아예 DOM에서 제거: el.remove();
            }
        });
    }

    // 1. 페이지 로드 시 최초 실행
    removeWatermarks();

    // 2. 동적으로 로딩되는 콘텐츠(무한 스크롤 등) 대응을 위한 감시자 설정
    const observer = new MutationObserver((mutations) => {
        removeWatermarks();
    });

    observer.observe(document.body, {
        childList: true,
        subtree: true
    });

})();