🎉 欢迎访问GreasyFork.Org 镜像站!本镜像站由公众号【爱吃馍】搭建,用于分享脚本。联系邮箱📮

Greasy fork 爱吃馍镜像

Greasy Fork is available in English.

Codesign 自动密码填充器

自动检测URL中的密码参数并填充到 codesign 页面被遮挡的密码输入框

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

🚀 安装遇到问题?关注公众号获取帮助

公众号二维码

扫码关注【爱吃馍】

回复【脚本】获取最新教程和防失联地址

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

ستحتاج إلى تثبيت إضافة مثل Stylus لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتتمكن من تثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

(لدي بالفعل مثبت أنماط للمستخدم، دعني أقم بتثبيته!)

🚀 安装遇到问题?关注公众号获取帮助

公众号二维码

扫码关注【爱吃馍】

回复【脚本】获取最新教程和防失联地址

// ==UserScript==
// @name         Codesign 自动密码填充器
// @namespace    http://tampermonkey.net/
// @version      1.1
// @description  自动检测URL中的密码参数并填充到 codesign 页面被遮挡的密码输入框
// @author       You
// @match        https://codesign.qq.com/*
// @grant        none
// @run-at       document-end
// @author       shiyi
// @license      MIT
// ==/UserScript==

(function () {
    'use strict';

    function getPassword() {
        const url = new URL(window.location.href);
        return url.searchParams.get('pwd') || url.searchParams.get('password');
    }

    function fillPassword() {
        const password = getPassword();
        if (!password) return;

        const input = document.querySelector('.t-input__wrap .t-input__inner');
        if (input) {
            input.focus();
            input.value = password;
            input.dispatchEvent(new Event('input', { bubbles: true }));
            input.dispatchEvent(new Event('change', { bubbles: true }));
            input.blur();

            console.log('[Codesign] 密码已自动填充');
        } else {
            console.warn('[Codesign] 未找到密码输入框');
        }
    }

    function waitForInput() {
        const interval = setInterval(() => {
            const input = document.querySelector('.t-input__wrap .t-input__inner');
            if (input) {
                clearInterval(interval);
                fillPassword();
            }
        }, 200);

        setTimeout(() => clearInterval(interval), 10000); // 最多等10秒
    }

    if (document.readyState === 'loading') {
        document.addEventListener('DOMContentLoaded', waitForInput);
    } else {
        waitForInput();
    }
})();