From da8ca0b1340a2afc4f1391effd3b3784a65577e5 Mon Sep 17 00:00:00 2001 From: hogashi Date: Tue, 8 Aug 2023 14:14:17 +0900 Subject: [PATCH 1/4] fixFileNameOnSaveCommand no longer needed when format/name query parameters, not :orig --- src/main.ts | 7 ++----- src/utils.ts | 1 + 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/main.ts b/src/main.ts index 90c78cfe..cfe6ef71 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,12 +1,9 @@ -import { isImageTab, isTweetdeck, isTwitter } from './constants'; -import { fixFileNameOnSaveCommand, setOriginalButton, updateOptions } from './utils'; +import { isTweetdeck, isTwitter } from './constants'; +import { setOriginalButton, updateOptions } from './utils'; updateOptions().then((options) => { if (isTwitter() || isTweetdeck()) { /** 公式Web/TweetDeck */ setOriginalButton(options); - } else if (isImageTab()) { - /** 画像ページ(https://pbs.twimg.com/*) */ - fixFileNameOnSaveCommand(options); } }); diff --git a/src/utils.ts b/src/utils.ts index 780cf557..a62536ac 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -279,6 +279,7 @@ export const setOriginalButton = (options: OptionsBool): void => { }; /** + * @deprecated * twitterの画像を表示したときのC-sを拡張 * 画像のファイル名を「~.jpg-orig」「~.png-orig」ではなく「~-orig.jpg」「~-orig.png」にする */ From c6b5b704e9f9eddc511036ff330b24b774c099fb Mon Sep 17 00:00:00 2001 From: hogashi Date: Tue, 8 Aug 2023 14:19:26 +0900 Subject: [PATCH 2/4] remove img page option --- src/extension-contexts/popup.tsx | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/extension-contexts/popup.tsx b/src/extension-contexts/popup.tsx index c20f941c..24b31a41 100644 --- a/src/extension-contexts/popup.tsx +++ b/src/extension-contexts/popup.tsx @@ -20,7 +20,6 @@ import { SHOW_ON_TWEET_DETAIL, SHOW_ON_TWEETDECK_TIMELINE, SHOW_ON_TWEETDECK_TWEET_DETAIL, - STRIP_IMAGE_SUFFIX, OPTIONS_TEXT, OptionsBool, } from '../constants'; @@ -113,9 +112,6 @@ export const Popup = (props: Props): JSX.Element => { {optionsItems[SHOW_ON_TWEETDECK_TIMELINE]} {optionsItems[SHOW_ON_TWEETDECK_TWEET_DETAIL]} - 画像ページ}> - {optionsItems[STRIP_IMAGE_SUFFIX]} -