Forked from akinov/moneyforward_timesheet_completer.js
Created
December 26, 2019 08:50
-
-
Save oieioi/6481cd08d4e7a1b74eaa8d5232edebd5 to your computer and use it in GitHub Desktop.
マネフォクラウドの勤怠一括入力
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name MoneyForward 勤務時間一括入力ボタン | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description MoneyForward 勤務時間一括入力ボタン | |
// @author You | |
// @match https://payroll.moneyforward.com/my/multiple_timesheet_employee_daily_records/edit | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
const inputAll = () => { | |
const start = prompt('始業時間は?(初期値: 10:00)') || '10:00'; | |
const end = prompt('就業時間は?(初期値: 19:00)') || '19:00'; | |
$('#js-multiple-timesheet-employee-daily-records-table tr').each((i, e)=>{ | |
if (!/平日/.test(e.textContent)) return; | |
$('.add_fields',e).click(); | |
$('[name*="elapsed_minutes_at_work_in_with_neuminour_string_format"]', e)[0].value = start; | |
$('[name*="elapsed_minutes_at_work_out_with_neuminour_string_format"]', e)[0].value = end; | |
}) | |
} | |
const button = $('<button>🦑 一括入力 😎</button>').click(inputAll); | |
$('.payrolls-this-month').append(button); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment