您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
密码输入框,可直观展示密码
// ==UserScript== // @name 密码展示 // @namespace arale // @version 0.1.4 // @description 密码输入框,可直观展示密码 // @author Gj // @match *://*/* // @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw== // @grant none // @license MIT // ==/UserScript== (function () { 'use strict'; const LocalEvnKey = 'show_password_env' const envKey = sessionStorage.getItem(LocalEvnKey) || 'hide' const findTarget = document.querySelectorAll('[type="password"]') function changeAttrByPwd(isShow) { findTarget.forEach(item => { item.setAttribute('type', isShow ? 'text' : 'password') }) } changeAttrByPwd(envKey == 'show') const container = document.createElement('div') const labelDom = document.createElement('label') labelDom.innerText = '密码' labelDom.style.cssText = 'margin-right: 5px; font-size: 12px;color: #fff;cursor: pointer;' labelDom.setAttribute('for', 'show_password_check_box') container.appendChild(labelDom) const checkDom = document.createElement('input') checkDom.setAttribute('type', 'checkbox') checkDom.id = 'show_password_check_box' if (envKey == 'show') checkDom.setAttribute('checked', envKey) else checkDom.removeAttribute('checked') checkDom.onchange = function () { checkDom.setAttribute('checked', checkDom.checked) if (!checkDom.checked) checkDom.removeAttribute('checked') sessionStorage.setItem(LocalEvnKey, checkDom.checked ? 'show' : 'hide') changeAttrByPwd(checkDom.checked) } container.appendChild(checkDom) // container.style.cssText = 'position: absolute;top: 10px;left: 70px;z-index: 9999;background-color: #fff;' container.style.cssText = ` width: 60px; height: 30px; position: fixed; z-index: 999999; top: 45px; left: -55px; background-color: #d9534f; border-color: #d43f3a; border: none; border-radius: 5px; display: flex; justify-content: center; align-items: center; transition: all 0.1s;` container.onmouseover = function () { this.style.left = '0px' } container.onmouseout = function () { this.style.left = '-55px' } if (findTarget.length > 0) document.body.appendChild(container) })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址