Skip to content

Commit

Permalink
Move between months instead of pages
Browse files Browse the repository at this point in the history
  • Loading branch information
mkobayashime committed Oct 10, 2023
1 parent 34ad823 commit 83e7b1d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions dist/etc-meisai-shortcuts.user.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==UserScript==
// @name ETC利用照会サービス - Shortcut keys
// @namespace mkobayashime
// @version 1.2.2
// @version 2.0.0
// @description ETC利用照会サービスに h/l などのショートカットキーを追加します
// @author mkobayashime
// @homepage https://github.com/mkobayashime/userscripts
Expand All @@ -26,7 +26,7 @@ const isTyping = () => {
if (isTyping()) return;
if (e.key === "h" || e.key === "ArrowLeft") {
const prevPageButton = document.evaluate(
"//button[contains(text(), '前頁')]",
"//button[contains(text(), '前月')]",
document,
null,
XPathResult.FIRST_ORDERED_NODE_TYPE,
Expand All @@ -37,7 +37,7 @@ const isTyping = () => {
}
if (e.key === "l" || e.key === "ArrowRight") {
const nextPageButton = document.evaluate(
"//button[contains(text(), '次頁')]",
"//button[contains(text(), '翌月')]",
document,
null,
XPathResult.FIRST_ORDERED_NODE_TYPE,
Expand Down
4 changes: 2 additions & 2 deletions src/userscripts/etc-meisai-shortcuts.user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { isTyping } from "./utils/isTyping";

if (e.key === "h" || e.key === "ArrowLeft") {
const prevPageButton = document.evaluate(
"//button[contains(text(), '前頁')]",
"//button[contains(text(), '前月')]",
document,
null,
XPathResult.FIRST_ORDERED_NODE_TYPE,
Expand All @@ -19,7 +19,7 @@ import { isTyping } from "./utils/isTyping";

if (e.key === "l" || e.key === "ArrowRight") {
const nextPageButton = document.evaluate(
"//button[contains(text(), '次頁')]",
"//button[contains(text(), '翌月')]",
document,
null,
XPathResult.FIRST_ORDERED_NODE_TYPE,
Expand Down
2 changes: 1 addition & 1 deletion src/userscripts/meta/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const meta: { [name: string]: UserScriptMeta | undefined } = {
match: "https://www2.etc-meisai.jp/etc/*",
name: "ETC利用照会サービス - Shortcut keys",
runAt: "document-end",
version: "1.2.2",
version: "2.0.0",
},
"freee-shortcuts": {
description: "freee にショートカットキーを追加します",
Expand Down

0 comments on commit 83e7b1d

Please sign in to comment.