您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
when opening PDF auto import ID number.
// ==UserScript== // @name Auto import ID number // @namespace http://tampermonkey.net/ // @version 1.0 // @description when opening PDF auto import ID number. // @author Adokun // @match https://mail.google.com/* // @grant none // ==/UserScript== (function () { // 將IDNumber改成自己的身分證 const IDNumber = 'A1234567890'; document.addEventListener('DOMSubtreeModified', (event) => { if (event.target instanceof Element) { if (event.target.getAttribute('role') === 'dialog' && event.target.classList.contains('aLF-aPX-axU')) { setTimeout(() => { let J = JSON.parse(document.querySelector('#drive-active-item-info').innerText); if (/\.pdf$/i.test(J.title)) { let inputEl = event.target.querySelector('[type="password"]'); inputEl.value = IDNumber; inputEl.dispatchEvent(new Event('change')); } }, 1000); } } }); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址