Skip to content

Commit

Permalink
Improve xperienceunited.com rule (#1193)
Browse files Browse the repository at this point in the history
  • Loading branch information
qsniyg committed Mar 16, 2024
1 parent 91eaa4d commit a817693
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
2023.3.1 (in-dev)

Special thanks to fireattack, nimbuz, Froktime for their contributions and reports for this release
Special thanks to fireattack, nimbuz, Froktime, fyhtma for their contributions and reports for this release

---

Expand Down
6 changes: 5 additions & 1 deletion src/userscript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41315,7 +41315,11 @@ var $$IMU_EXPORT$$;
// thanks to fyhtma on github: https://github.com/qsniyg/maxurl/issues/1193
// https://xperienceunited.com:8080/userphotos/63f20f4cd1ab9a64b2909056-1676823380378-800.webp?0-6406eac4bc4b4c2ad16245c5.webp
// https://xperienceunited.com:8080/userphotos/63f20f4cd1ab9a64b2909056-1676823380378.webp?0-6406eac4bc4b4c2ad16245c5.webp
return src.replace(/(\/userphotos\/+[0-9a-f]+-[0-9]+)-[0-9]+\./, "$1.")
// https://xperienceunited.com:8080/userphotos/63f20f4cd1ab9a64b2909056-1676823380378-thumbnail?0-6406eac4bc4b4c2ad16245c5.webp
// https://xperienceunited.com:8080/userphotos/63f20f4cd1ab9a64b2909056-1676823380378.webp?0-6406eac4bc4b4c2ad16245c5.webp
return src
.replace(/(\/userphotos\/+[0-9a-f]+-[0-9]+)-thumbnail([?#].*)?$/, "$1.webp$2")
.replace(/(\/userphotos\/+[0-9a-f]+-[0-9]+)-[0-9]+\./, "$1.")
}

if (domain === "image.thanhnien.vn") {
Expand Down
6 changes: 5 additions & 1 deletion userscript.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -37783,7 +37783,11 @@ var $$IMU_EXPORT$$;
// thanks to fyhtma on github: https://github.com/qsniyg/maxurl/issues/1193
// https://xperienceunited.com:8080/userphotos/63f20f4cd1ab9a64b2909056-1676823380378-800.webp?0-6406eac4bc4b4c2ad16245c5.webp
// https://xperienceunited.com:8080/userphotos/63f20f4cd1ab9a64b2909056-1676823380378.webp?0-6406eac4bc4b4c2ad16245c5.webp
return src.replace(/(\/userphotos\/+[0-9a-f]+-[0-9]+)-[0-9]+\./, "$1.");
// https://xperienceunited.com:8080/userphotos/63f20f4cd1ab9a64b2909056-1676823380378-thumbnail?0-6406eac4bc4b4c2ad16245c5.webp
// https://xperienceunited.com:8080/userphotos/63f20f4cd1ab9a64b2909056-1676823380378.webp?0-6406eac4bc4b4c2ad16245c5.webp
return src
.replace(/(\/userphotos\/+[0-9a-f]+-[0-9]+)-thumbnail([?#].*)?$/, "$1.webp$2")
.replace(/(\/userphotos\/+[0-9a-f]+-[0-9]+)-[0-9]+\./, "$1.");
}
if (domain === "image.thanhnien.vn") {
// https://image.thanhnien.vn/1600/Uploaded/phangiang/2016_03_12/anh_lfyk.jpg
Expand Down

0 comments on commit a817693

Please sign in to comment.