您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
모든 빈 댓글에 자신이 원하는 내용을 삽입할 수 있음
// ==UserScript== // @name 빈댓글 내용 바꾸기 // @namespace http://tampermonkey.net/ // @version 1 // @license MIT // @description 모든 빈 댓글에 자신이 원하는 내용을 삽입할 수 있음 // @author 사실나는클리앙을하는사람 // @match https://www.clien.net/service/board/* // @grant none // @run-at document-end // ==/UserScript== (function () { 'use strict'; function isEffectivelyEmpty(content) { const trimmed = content.trim(); if (trimmed === "") return true; const mentionPattern = /^「@[^*]+*[^*]+*님」$/; if (mentionPattern.test(trimmed)) return true; return false; } function patchEmptyComments() { const commentContainers = document.querySelectorAll('.comment_content'); commentContainers.forEach(container => { const view = container.querySelector('.comment_view'); if (!view) return; const input = view.querySelector('input[data-comment-modify]'); if (!input) return; const originalValue = input.value; if (isEffectivelyEmpty(originalValue)) { // 중복 삽입 방지 if (!view.innerText.includes("전 당신의 의견에 동의하지는 않으니 빈댓글 보내겠습니다. 힘내세요.")) { view.appendChild(document.createTextNode("전 당신의 의견에 동의하지는 않으니 빈댓글 보내겠습니다. 힘내세요.")); input.value = "전 당신의 의견에 동의하지는 않으니 빈댓글 보내겠습니다. 힘내세요."; } } }); } patchEmptyComments(); const observer = new MutationObserver(() => { patchEmptyComments(); }); observer.observe(document.body, { childList: true, subtree: true, }); })();