Skip to content

Commit

Permalink
Extra cleaning for Wish
Browse files Browse the repository at this point in the history
  • Loading branch information
Julynx committed Aug 28, 2023
1 parent 6341943 commit 2092d35
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions url_slim/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,13 @@ document.addEventListener('DOMContentLoaded', function () {
clean_url = url_parts.join("/");
}

// -- Wish URLs can be minimized removing everything before "/product/"
else if (clean_url.startsWith("https://www.wish") && clean_url.includes("/product/")) {
var url_parts = clean_url.split("/");
url_parts.splice(3, url_parts.indexOf("product") - 3);
clean_url = url_parts.join("/");
}

// Final removal of the trailing slash
if (clean_url.endsWith("/")) {
clean_url = clean_url.slice(0, -1);
Expand Down

0 comments on commit 2092d35

Please sign in to comment.