Skip to content

Commit

Permalink
[勤労の獅子] 未ログイン状態の挙動を追加 (#13)
Browse files Browse the repository at this point in the history
* 勤労の獅子チェックツールドメイン変更の対応

* [勤労の獅子] 未ログイン状態のときにログイン画面へ遷移
  • Loading branch information
tetsunosuke authored Dec 22, 2021
1 parent 81560fe commit 18e1de2
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==UserScript==
// @name [勤労の獅子]重エラーのバックグラウンドチェック
// @namespace https://kinrou.hr44.jp/kinrou/kojin/kintaiDakoku/
// @version 1.1
// @version 1.1.1
// @description 勤労の獅子の当月勤怠データから重エラーを検知します
// @author ITO Tetsunosuke
// @match https://kinrou.hr44.jp/kinrou/kojin/kintaiDakoku/
Expand All @@ -13,6 +13,13 @@
'use strict';

const url = "/kinrou/kojin/kojinbetuSyoukai/";
// ログアウト状態で表示しようとしたときに自動でログイン画面へ
const errorAnchor = document.querySelector("#error-suggestions a");
if (errorAnchor !== null) {
const href = errorAnchor.href;
location.href = href;
return;
}
GM_xmlhttpRequest({
method: "GET",
url: url,
Expand Down

0 comments on commit 18e1de2

Please sign in to comment.