// ==UserScript==
// @name PikPak 자동 입력 및 버튼 감시 클릭
// @namespace http://tampermonkey.net/
// @version 1.2
// @description 비밀번호 입력 후 버튼 활성화 감지하여 자동 클릭
// @match https://*.mypikpak.com/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
const fixedPassword = "ABCDEFGH"; // 원하는 비밀번호 입력
const fillPassword = () => {
const input = document.querySelector('input.el-input__inner[placeholder="비밀번호를 입력해주세요"]');
if (input) {
input.value = fixedPassword;
input.dispatchEvent(new Event('input', { bubbles: true }));
}
};
const observeButton = () => {
const targetButton = Array.from(document.querySelectorAll('button')).find(btn =>
btn.textContent.includes("파일 보기")
);
if (!targetButton) return;
const tryClick = () => {
if (!targetButton.disabled && targetButton.getAttribute("aria-disabled") === "false") {
const clickEvent = new MouseEvent('click', {
bubbles: true,
cancelable: true,
view: window
});
targetButton.dispatchEvent(clickEvent);
observer.disconnect(); // 클릭 후 감시 중단
}
};
const observer = new MutationObserver(tryClick);
observer.observe(targetButton, { attributes: true, attributeFilter: ["disabled", "aria-disabled", "class"] });
// 혹시 이미 활성화 상태라면 바로 시도
tryClick();
};
window.addEventListener('load', () => {
setTimeout(() => {
fillPassword();
observeButton();
}, 1000);
});
})();
크롬 확장프로그램 tempermoney 다운로드 후 우클릭 새 스크립트 만들기, 위 스크립트 전부 복사 후 const fixedPassword = "ABCDEFGH"; // 원하는 비밀번호 입력 부분에서 ABCDEFGH를 본인이 아는 패스워드로 변경 후 저장.
난 잘되길래 올렸는데 안되도 몰?루
