Skip to content

Commit

Permalink
Merge pull request #115 from ncaq/77-delete-url-feature
Browse files Browse the repository at this point in the history
fix!: Googleのデザイン変更で「このページを翻訳する」が潰れるようになったのを解消 closed #77
  • Loading branch information
ncaq authored Mar 12, 2023
2 parents dfbff2e + a8d104b commit 24e9d22
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 80 deletions.
3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
"devDependencies": {
"@types/encoding-japanese": "^2.0.1",
"@types/node": "^18.11.18",
"@types/punycode": "^2.1.0",
"@types/webextension-polyfill": "^0.10.0",
"@typescript-eslint/eslint-plugin": "^5.49.0",
"@typescript-eslint/parser": "^5.49.0",
Expand All @@ -43,8 +42,6 @@
"events": "^3.3.0",
"fp-ts": "^2.13.1",
"io-ts": "^2.2.20",
"punycode": "^2.3.0",
"string-width": "^5.0.0",
"webextension-polyfill": "^0.10.0"
}
}
6 changes: 1 addition & 5 deletions src/content/main.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { replaceLinkTitles } from "./title";
import { replaceLinkUrls } from "./url";

/**
* CSSセレクタで気をつけていてもどうしてもGoogleのwebキャッシュなど不要なURLが集まってしまうのでフィルタリングをかけます。
Expand Down Expand Up @@ -30,10 +29,7 @@ function selectLinkElements(el: Element): Element[] {

/** エントリーポイント。 */
async function main(el: Element): Promise<void[]> {
const links = selectLinkElements(el);
const titleP = replaceLinkTitles(links);
replaceLinkUrls(links);
return titleP;
return replaceLinkTitles(selectLinkElements(el));
}

// エントリーポイントを実行します。
Expand Down
61 changes: 0 additions & 61 deletions src/content/url.ts

This file was deleted.

12 changes: 1 addition & 11 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -330,11 +330,6 @@
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.18.tgz#8dfb97f0da23c2293e554c5a50d61ef134d7697f"
integrity sha512-DHQpWGjyQKSHj3ebjFI/wRKcqQcdR+MoFBygntYOZytCqNfkd2ZC4ARDJ2DQqhjH5p85Nnd3jhUJIXrszFX/JA==

"@types/punycode@^2.1.0":
version "2.1.0"
resolved "https://registry.yarnpkg.com/@types/punycode/-/punycode-2.1.0.tgz#89e4f3d09b3f92e87a80505af19be7e0c31d4e83"
integrity sha512-PG5aLpW6PJOeV2fHRslP4IOMWn+G+Uq8CfnyJ+PDS8ndCbU+soO+fB3NKCKo0p/Jh2Y4aPaiQZsrOXFdzpcA6g==

"@types/semver@^7.3.12":
version "7.3.13"
resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.3.13.tgz#da4bfd73f49bd541d28920ab0e2bf0ee80f71c91"
Expand Down Expand Up @@ -3387,11 +3382,6 @@ punycode@^2.1.0, punycode@^2.1.1:
resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec"
integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==

punycode@^2.3.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.0.tgz#f67fa67c94da8f4d0cfff981aee4118064199b8f"
integrity sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==

pupa@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/pupa/-/pupa-3.1.0.tgz#f15610274376bbcc70c9a3aa8b505ea23f41c579"
Expand Down Expand Up @@ -3874,7 +3864,7 @@ string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
is-fullwidth-code-point "^3.0.0"
strip-ansi "^6.0.1"

string-width@^5.0.0, string-width@^5.0.1, string-width@^5.1.2:
string-width@^5.0.1, string-width@^5.1.2:
version "5.1.2"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-5.1.2.tgz#14f8daec6d81e7221d2a357e668cab73bdbca794"
integrity sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==
Expand Down

0 comments on commit 24e9d22

Please sign in to comment.