From 27b3defd5202b8687fe8f5f424562859643dabcc Mon Sep 17 00:00:00 2001 From: Masaki Kobayashi Date: Mon, 29 Jun 2026 03:33:43 +0900 Subject: [PATCH] Remove `zozotown-shortcuts` --- README.md | 4 -- dist/zozotown-shortcuts.user.js | 42 ------------------- .../zozotown-shortcuts/index.user.ts | 30 ------------- 3 files changed, 76 deletions(-) delete mode 100644 dist/zozotown-shortcuts.user.js delete mode 100644 src/userscripts/zozotown-shortcuts/index.user.ts diff --git a/README.md b/README.md index a86cc1c1..ebe176b5 100644 --- a/README.md +++ b/README.md @@ -98,10 +98,6 @@ Alert when you reload/close Slack with a new draft Google Meet-like Ctrl-d/e shortcuts in Zoom -### [ZOZOTOWN - Shortcut keys](https://github.com/mkobayashime/userscripts/raw/main/dist/zozotown-shortcuts.user.js) - -Next/Prev image with arrow/h/l keys - ## Styles (`*.user.css`) ### [Remove signup dialogue in Qiita](https://github.com/mkobayashime/userscripts/raw/main/src/qiita-no-dialogue.user.css) diff --git a/dist/zozotown-shortcuts.user.js b/dist/zozotown-shortcuts.user.js deleted file mode 100644 index c808cb64..00000000 --- a/dist/zozotown-shortcuts.user.js +++ /dev/null @@ -1,42 +0,0 @@ -// ==UserScript== -// @name ZOZOTOWN - Shortcut keys -// @namespace mkobayashime -// @version 1.4.4 -// @description Next/Prev image with arrow/h/l keys -// @icon https://www.google.com/s2/favicons?domain=zozo.jp -// @author mkobayashime -// @homepage https://github.com/mkobayashime/userscripts -// @homepageURL https://github.com/mkobayashime/userscripts -// @match https://zozo.jp/* -// @run-at document-end -// @updateURL https://github.com/mkobayashime/userscripts/raw/main/dist/zozotown-shortcuts.user.js -// @downloadURL https://github.com/mkobayashime/userscripts/raw/main/dist/zozotown-shortcuts.user.js -// ==/UserScript== - -// src/userscripts/utils/isTyping.ts -var isTyping = () => { - const inputTags = ["INPUT", "TEXTAREA", "SELECT"]; - return ( - inputTags.includes(document.activeElement?.tagName.toUpperCase() ?? "") || - document.activeElement?.attributes.getNamedItem("role")?.value === "textbox" - ); -}; - -// src/userscripts/zozotown-shortcuts/index.user.ts -void (() => { - window.addEventListener("keydown", (e) => { - if (isTyping()) return; - if (e.key === "l" || e.key === "ArrowRight") { - const nextButton = document.querySelector( - "#goods-image-carousel .swiper-button-next", - ); - if (nextButton) nextButton.click(); - } - if (e.key === "h" || e.key === "ArrowLeft") { - const prevButton = document.querySelector( - "#goods-image-carousel .swiper-button-prev", - ); - if (prevButton) prevButton.click(); - } - }); -})(); diff --git a/src/userscripts/zozotown-shortcuts/index.user.ts b/src/userscripts/zozotown-shortcuts/index.user.ts deleted file mode 100644 index 440ee7c4..00000000 --- a/src/userscripts/zozotown-shortcuts/index.user.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { defineUserScript } from "bundlemonkey"; -import { isTyping } from "../utils/isTyping"; - -export default defineUserScript({ - name: "ZOZOTOWN - Shortcut keys", - version: "1.4.4", - description: "Next/Prev image with arrow/h/l keys", - match: ["https://zozo.jp/*"], - runAt: "document-end", - icon: "https://www.google.com/s2/favicons?domain=zozo.jp", - main: () => { - window.addEventListener("keydown", (e) => { - if (isTyping()) return; - - if (e.key === "l" || e.key === "ArrowRight") { - const nextButton = document.querySelector( - "#goods-image-carousel .swiper-button-next", - ); - if (nextButton) nextButton.click(); - } - - if (e.key === "h" || e.key === "ArrowLeft") { - const prevButton = document.querySelector( - "#goods-image-carousel .swiper-button-prev", - ); - if (prevButton) prevButton.click(); - } - }); - }, -});