Skip to content

Commit

Permalink
Add support for awork uploads
Browse files Browse the repository at this point in the history
  • Loading branch information
TheLastZombie committed Nov 30, 2023
1 parent 79ed798 commit c3091f3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/userscript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109247,6 +109247,16 @@ var $$IMU_EXPORT$$;
return src.replace(/(\/[0-9]+)-[ms](\.[^/.]+)(?:[?#].*)?$/, "$1-orig$2");
}

if (domain_nosub === "awork.com") {
// awork is a project management tool and uploaded assets are private. The URLs in the below example won't work but are still included for illustration purposes.
// https://name-of-workspace.awork.com/api/v1/files/85ee1659-f903-4163-9361-bedf2b242ef9/download?crop=false&width=1024&height=1024&enlarge=false&v=1701093812740
// https://name-of-workspace.awork.com/api/v1/files/85ee1659-f903-4163-9361-bedf2b242ef9/download?crop=false&enlarge=false&v=1701093812740
match = src.match(/\/api\/v1\/files\/[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}\/download\?/);
if (match) {
return remove_queries(src, ["width", "height"]);
}
}




Expand Down

0 comments on commit c3091f3

Please sign in to comment.