Skip to content

Commit

Permalink
Support another imagedelivery website (fixes #1383)
Browse files Browse the repository at this point in the history
  • Loading branch information
qsniyg committed Nov 28, 2024
1 parent 71abbb3 commit d56d4f0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/userscript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96662,6 +96662,7 @@ var $$IMU_EXPORT$$;
.replace(/\/sizedimages\/+([^/]+\/+)[0-9]+\/+/, "/images/$1");
}

// https://github.com/lovell/sharp ?
if (domain === "d1iiivw74516uk.cloudfront.net" ||
// https://d27csu38upkiqd.cloudfront.net/eyJidWNrZXQiOiJmZGMtc2l0ZXB1YmxpYy1tZWRpYS1wcm9kIiwia2V5IjoidXBsb2Fkc1wvMjAyM1wvMDNcLzgwNDk0LmpwZyIsImVkaXRzIjp7InJlc2l6ZSI6eyJ3aWR0aCI6Mjk2LCJmaXQiOiJjb3ZlciJ9LCJ0b0Zvcm1hdCI6IndlYnAifX0=
// https://d27csu38upkiqd.cloudfront.net/eyJidWNrZXQiOiJmZGMtc2l0ZXB1YmxpYy1tZWRpYS1wcm9kIiwia2V5IjoidXBsb2Fkcy8yMDIzLzAzLzgwNDk0LmpwZyJ9
Expand Down Expand Up @@ -114221,11 +114222,15 @@ var $$IMU_EXPORT$$;
// https://imagedelivery.net/CNHQDfI-aOkA7ffs8mbdmA/item-images/nec481.jpg/w=9999999 -- 4328x4328
// https://imagedelivery.net/nx-BariuFDW3u41l69hhKg/534e5b59-d91f-47ad-159d-bbe88b514100/header
// https://imagedelivery.net/nx-BariuFDW3u41l69hhKg/534e5b59-d91f-47ad-159d-bbe88b514100/w=9999999 -- 1556x723
// thanks to byjrg on github: https://github.com/qsniyg/maxurl/issues/1383
// https://imagedelivery.net/qQuMkbHJ-0s6rwu8vup_5w/7268a63b-9a30-4adf-566f-25e75f2cc800/2x
// https://imagedelivery.net/qQuMkbHJ-0s6rwu8vup_5w/7268a63b-9a30-4adf-566f-25e75f2cc800/original -- 1083x1673
// other:
// https://imagedelivery.net/tBWwepYnH_U9dHRAxdyD6g/438f8275-00a2-4af5-6d77-7bfd77c9b700/origin
// https://imagedelivery.net/tBWwepYnH_U9dHRAxdyD6g/438f8275-00a2-4af5-6d77-7bfd77c9b700/w=9999999 -- ERROR 9429: Flexible variants are not enabled for the account
let cf_original_map = {
"QondspN4HIUvB_R16-ddAQ": "original"
"QondspN4HIUvB_R16-ddAQ": "original",
"qQuMkbHJ-0s6rwu8vup_5w": "original"
};

match = src.match(/^[a-z]+:\/\/[^/]+\/+([^/]+)\/+/);
Expand Down
7 changes: 6 additions & 1 deletion userscript.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -86996,6 +86996,7 @@ var $$IMU_EXPORT$$;
return src
.replace(/\/sizedimages\/+([^/]+\/+)[0-9]+\/+/, "/images/$1");
}
// https://github.com/lovell/sharp ?
if (domain === "d1iiivw74516uk.cloudfront.net" ||
// https://d27csu38upkiqd.cloudfront.net/eyJidWNrZXQiOiJmZGMtc2l0ZXB1YmxpYy1tZWRpYS1wcm9kIiwia2V5IjoidXBsb2Fkc1wvMjAyM1wvMDNcLzgwNDk0LmpwZyIsImVkaXRzIjp7InJlc2l6ZSI6eyJ3aWR0aCI6Mjk2LCJmaXQiOiJjb3ZlciJ9LCJ0b0Zvcm1hdCI6IndlYnAifX0=
// https://d27csu38upkiqd.cloudfront.net/eyJidWNrZXQiOiJmZGMtc2l0ZXB1YmxpYy1tZWRpYS1wcm9kIiwia2V5IjoidXBsb2Fkcy8yMDIzLzAzLzgwNDk0LmpwZyJ9
Expand Down Expand Up @@ -102692,11 +102693,15 @@ var $$IMU_EXPORT$$;
// https://imagedelivery.net/CNHQDfI-aOkA7ffs8mbdmA/item-images/nec481.jpg/w=9999999 -- 4328x4328
// https://imagedelivery.net/nx-BariuFDW3u41l69hhKg/534e5b59-d91f-47ad-159d-bbe88b514100/header
// https://imagedelivery.net/nx-BariuFDW3u41l69hhKg/534e5b59-d91f-47ad-159d-bbe88b514100/w=9999999 -- 1556x723
// thanks to byjrg on github: https://github.com/qsniyg/maxurl/issues/1383
// https://imagedelivery.net/qQuMkbHJ-0s6rwu8vup_5w/7268a63b-9a30-4adf-566f-25e75f2cc800/2x
// https://imagedelivery.net/qQuMkbHJ-0s6rwu8vup_5w/7268a63b-9a30-4adf-566f-25e75f2cc800/original -- 1083x1673
// other:
// https://imagedelivery.net/tBWwepYnH_U9dHRAxdyD6g/438f8275-00a2-4af5-6d77-7bfd77c9b700/origin
// https://imagedelivery.net/tBWwepYnH_U9dHRAxdyD6g/438f8275-00a2-4af5-6d77-7bfd77c9b700/w=9999999 -- ERROR 9429: Flexible variants are not enabled for the account
var cf_original_map = {
"QondspN4HIUvB_R16-ddAQ": "original"
"QondspN4HIUvB_R16-ddAQ": "original",
"qQuMkbHJ-0s6rwu8vup_5w": "original"
};
match = src.match(/^[a-z]+:\/\/[^/]+\/+([^/]+)\/+/);
if (match) {
Expand Down

0 comments on commit d56d4f0

Please sign in to comment.