Skip to content

Commit

Permalink
fix: rpp.gmarket.co.kr handling issue
Browse files Browse the repository at this point in the history
  • Loading branch information
piquark6046 committed Jul 29, 2023
1 parent 3c976fe commit 17b6141
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions linkproduct-privacy.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// @downloadURL https://cdn.jsdelivr.net/gh/List-KR/linkproduct-privacy@main/linkproduct-privacy.user.js
// @license MIT
//
// @version 1.2.3
// @version 1.2.4
// @author PiQuark6046 and contributors
//
// @match *://*/*
Expand Down Expand Up @@ -54,7 +54,9 @@
URLPattern: /^https:\/\/[a-z]+\.gmarket\.co\.kr\/linkprice\/lpfront\.asp/,
ModificationFunction: function (ResultURL) {
let SearchParamsURL = new URL(ResultURL).searchParams.get('url');
return /^https:\/\/m?item\.gmarket\.co\.kr\/(detailview\/)?Item(\.asp)?\?goodscode=[0-9]+/.exec(SearchParamsURL)[0];
let OriginalURL = new URL(SearchParamsURL);
OriginalURL.searchParams.delete('jaehuid');
return OriginalURL.href;
}
},
{
Expand Down
6 changes: 4 additions & 2 deletions linkproduct-privacy.user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// @downloadURL https://cdn.jsdelivr.net/gh/List-KR/linkproduct-privacy@main/linkproduct-privacy.user.js
// @license MIT
//
// @version 1.2.3
// @version 1.2.4
// @author PiQuark6046 and contributors
//
// @match *://*/*
Expand Down Expand Up @@ -115,7 +115,9 @@ interface LinkProductURL {
URLPattern: /^https:\/\/[a-z]+\.gmarket\.co\.kr\/linkprice\/lpfront\.asp/,
ModificationFunction: function (ResultURL: string) {
let SearchParamsURL = new URL(ResultURL).searchParams.get('url')
return /^https:\/\/m?item\.gmarket\.co\.kr\/(detailview\/)?Item(\.asp)?\?goodscode=[0-9]+/.exec(SearchParamsURL)[0]
let OriginalURL = new URL(SearchParamsURL)
OriginalURL.searchParams.delete('jaehuid')
return OriginalURL.href
}
},
{
Expand Down

0 comments on commit 17b6141

Please sign in to comment.