您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
unhides the text rendered on successful punch in/out
// ==UserScript== // @name timeclock punch unhider // @namespace http://tampermonkey.net/ // @version 0.5 // @description unhides the text rendered on successful punch in/out // @author Eric Stanard // @match https://secure7.saashr.com/ta/6201879* // @grant none // @license MIT // ==/UserScript== (function() { 'use strict'; // Function to modify the display type of the element function modifyElement() { const element = document.getElementById('infos'); if (element) { console.log('Element found:', element); element.style.removeProperty('display'); } } function addAutocomplete() { const inputElement = document.querySelector('input.editFormText[name="Badge"]'); if (inputElement) { console.log('Input element found:', inputElement); inputElement.setAttribute('autocomplete', 'on'); } } const observer = new MutationObserver(mutations => { for (const mutation of mutations) { if (mutation.addedNodes.length) { for (const node of mutation.addedNodes) { if (node.id === 'infos' || (node.querySelector && node.querySelector('#infos'))) { console.log('Mutation detected:', node); modifyElement(); } if (node.matches && node.matches('input.editFormText[name="Badge"]') || (node.querySelector && node.querySelector('input.editFormText[name="Badge"]'))) { console.log('Input element mutation detected:', node); addAutocomplete(); } } } } }); observer.observe(document.body, { childList: true, subtree: true }); modifyElement(); addAutocomplete(); })();