Skip to content

Commit

Permalink
Update vsco rule
Browse files Browse the repository at this point in the history
  • Loading branch information
qsniyg committed May 20, 2024
1 parent 462b2b8 commit a9d547a
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 2 deletions.
21 changes: 20 additions & 1 deletion src/userscript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76943,7 +76943,8 @@ var $$IMU_EXPORT$$;

// thanks to remlap and Flame for reporting:
// https://image-aws-us-west-2.vsco.co/derivative/5f64e7566a42a63298549df8?fit=crop&h=210&w=210
match = src.match(/\/derivative\/+([0-9a-f]{5,})/);
// https://image-aws-us-west-2.vsco.co/derivative/c69ba2/8053058/5c9d80d33722ba472b0dd822/vsco5c9d80d3bc610.jpg
match = src.match(/\/derivative\/+(?:[0-9a-f]+\/+[0-9]+\/+)?([0-9a-f]{20,})/);
if (options.do_request && options.cb && match) {
common_functions["get_redirect_url"](api_cache, options, "https://vsco.co/i/" + match[1], function(url) {
options.cb({
Expand All @@ -76967,6 +76968,24 @@ var $$IMU_EXPORT$$;
}
}

if (domain === "i.vsco.co" && options.do_request && options.cb) {
// thanks to remlap for reporting:
// https://vsco.co/i/[0-9a-f]{6}
if (/\/i\/+[0-9a-f]+$/.test(src)) {
common_functions["get_redirect_url"](api_cache, options, {
url: src,
headers: {
Referer: "https://vsco.co"
}
}, function(url) {
options.cb({
url: url,
can_head: false
});
});
}
}

if (domain_nowww === "screenbeauty.com") {
// https://screenbeauty.com/image/compress/selena-gomez-actress-celebrity-118789.jpg
// https://screenbeauty.com/image/wallpapers/selena-gomez-actress-celebrity-118789.jpg -- mildly upscaled?
Expand Down
20 changes: 19 additions & 1 deletion userscript.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -69541,7 +69541,8 @@ var $$IMU_EXPORT$$;
};
// thanks to remlap and Flame for reporting:
// https://image-aws-us-west-2.vsco.co/derivative/5f64e7566a42a63298549df8?fit=crop&h=210&w=210
match = src.match(/\/derivative\/+([0-9a-f]{5,})/);
// https://image-aws-us-west-2.vsco.co/derivative/c69ba2/8053058/5c9d80d33722ba472b0dd822/vsco5c9d80d3bc610.jpg
match = src.match(/\/derivative\/+(?:[0-9a-f]+\/+[0-9]+\/+)?([0-9a-f]{20,})/);
if (options.do_request && options.cb && match) {
common_functions["get_redirect_url"](api_cache, options, "https://vsco.co/i/" + match[1], function(url) {
options.cb({
Expand All @@ -69562,6 +69563,23 @@ var $$IMU_EXPORT$$;
};
}
}
if (domain === "i.vsco.co" && options.do_request && options.cb) {
// thanks to remlap for reporting:
// https://vsco.co/i/[0-9a-f]{6}
if (/\/i\/+[0-9a-f]+$/.test(src)) {
common_functions["get_redirect_url"](api_cache, options, {
url: src,
headers: {
Referer: "https://vsco.co"
}
}, function(url) {
options.cb({
url: url,
can_head: false
});
});
}
}
if (domain_nowww === "screenbeauty.com") {
// https://screenbeauty.com/image/compress/selena-gomez-actress-celebrity-118789.jpg
// https://screenbeauty.com/image/wallpapers/selena-gomez-actress-celebrity-118789.jpg -- mildly upscaled?
Expand Down

0 comments on commit a9d547a

Please sign in to comment.