您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Display the remaining required working hours in attendance page.
当前为
// ==UserScript== // @name AKASHI Show Remaining Hours // @namespace https://github.com/SlashNephy // @version 0.1.0 // @author SlashNephy // @description Display the remaining required working hours in attendance page. // @description:ja 出勤簿ページに残り必要な労働時間を表示します。 // @homepage https://scrapbox.io/slashnephy/AKASHI_%E3%81%AE%E6%AE%8B%E3%82%8A%E5%BF%85%E8%A6%81%E5%8A%B4%E5%83%8D%E6%99%82%E9%96%93%E3%82%92%E8%A1%A8%E7%A4%BA%E3%81%99%E3%82%8B_UserScript // @homepageURL https://scrapbox.io/slashnephy/AKASHI_%E3%81%AE%E6%AE%8B%E3%82%8A%E5%BF%85%E8%A6%81%E5%8A%B4%E5%83%8D%E6%99%82%E9%96%93%E3%82%92%E8%A1%A8%E7%A4%BA%E3%81%99%E3%82%8B_UserScript // @icon https://www.google.com/s2/favicons?sz=64&domain=atnd.ak4.jp // @supportURL https://github.com/SlashNephy/.github/issues // @match https://atnd.ak4.jp/attendance // @grant none // @license MIT license // ==/UserScript== (function () { 'use strict'; document.addEventListener('DOMNodeInserted', () => { const b = document.querySelector('#time-card-accordion-02 > div > div > table > tbody > tr > td:nth-child(2) > span'); if (b === null || b.textContent?.includes('(') !== false) { return; } const [a1, a2] = document .querySelector('#time-card-accordion-02 > div > div > table > tbody > tr > td:nth-child(1) > span') ?.textContent?.trim() .split(':') ?? []; if (a1 === undefined || a2 === undefined) { return; } const [b1, b2] = b.textContent.trim().split(':'); if (b1 === undefined || b2 === undefined) { return; } const [c1, c2] = document .querySelector('#time-card-accordion-02 > div > div > table > tbody > tr > td:nth-child(3) > span') ?.textContent?.trim() .split(':') ?? []; if (c1 === undefined || c2 === undefined) { return; } let h = parseInt(a1, 10) - parseInt(b1, 10) - parseInt(c1, 10); let m = parseInt(a2, 10) - parseInt(b2, 10) - parseInt(c2, 10); if (m < 0) { h -= Math.ceil(-m / 60); m = 60 + (m % 60); } const d = (h + m / 60) / 8; b.textContent += ` (-${h}:${m} = -${d.toFixed(2)} d)`; }); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址