您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Copy start date to end date on time entry edit page
// ==UserScript== // @name Moneybird - Copy start date to end date on time entry edit page // @namespace http://tampermonkey.net/ // @version 1.2 // @description Copy start date to end date on time entry edit page // @website https://gf.qytechs.cn/en/scripts/463397-moneybird-copy-start-date-to-end-date-on-time-entry-edit-page // @icon https://assets2.sorryapp.com/brand_favicons/files/000/004/522/original/favicon-32.png // @grant none // @author pindab0ter // @match https://moneybird.com/* // @license MIT // @run-at document-start // ==/UserScript== (function () { 'use strict'; // Function to handle copying the start date to the end date function copyStartDateToEndDate() { const startedAtDateInput = document.getElementById('time_entry_started_at') ?.parentElement?.parentElement?.getElementsByClassName('date-picker__input')?.item(0); const endedAtDateInput = document.getElementById('time_entry_ended_at') ?.parentElement?.parentElement?.getElementsByClassName('date-picker__input')?.item(0); if (startedAtDateInput && endedAtDateInput?.value === "") { endedAtDateInput.value = startedAtDateInput.value; } } // Check if we’re on the time entry edit page function checkTimeEntryEditPage() { if (window.location.pathname.match(/time_entries\/\d+\/edit/)) { copyStartDateToEndDate(); } } // Listen for changes using MutationObserver const observer = new MutationObserver(checkTimeEntryEditPage); observer.observe(document.documentElement, { childList: true, subtree: true }); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址