Skip to content

Commit

Permalink
More websites/rules
Browse files Browse the repository at this point in the history
Fixes #1273
  • Loading branch information
qsniyg committed Feb 5, 2024
1 parent 4ccd2f2 commit f34dd0d
Show file tree
Hide file tree
Showing 2 changed files with 93 additions and 0 deletions.
49 changes: 49 additions & 0 deletions src/userscript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40698,6 +40698,10 @@ var $$IMU_EXPORT$$;
// https://leftychan.net/hobby/thumb/1616876696039.png
// https://leftychan.net/hobby/src/1616876696039.png
domain_nowww === "leftychan.net" ||
// thanks to anonymous for reporting:
// https://anonimageboards.com/a/thumb/1706125797680.png
// https://anonimageboards.com/a/src/1706125797680.jpg
domain_nowww === "anonimageboards.com" ||
// https://lolcow.farm/ot/thumb/1530053186253.jpg
// https://lolcow.farm/ot/src/1530053186253.jpg
domain_nowww === "lolcow.farm") {
Expand Down Expand Up @@ -111897,6 +111901,51 @@ var $$IMU_EXPORT$$;
};
}

if (domain === "cdn-icons-png.flaticon.com") {
// thanks to anonymous for reporting:
// https://cdn-icons-png.flaticon.com/128/12766/12766209.png?fd=1 -- forces download
newsrc = remove_queries(src, ["fd"]);
if (newsrc !== src)
return newsrc;

// https://cdn-icons-png.flaticon.com/128/12766/12766209.png
// https://cdn-icons-png.flaticon.com/512/12766/12766209.png
return src.replace(/\/(?:32|64|128|256)\/+([0-9]+\/+[0-9]+\.)/, "/512/$1");
}

if (domain === "gaffa.blob.core.windows.net") {
// thanks to anonymous for reporting:
// https://gaffa.blob.core.windows.net/gaffa-media/media/62a39bf4-be8a-4272-94e9-319d8cd7555b/NytgaffaStativDkCopy1-SMALL.webp
// https://gaffa.blob.core.windows.net/gaffa-media/media/62a39bf4-be8a-4272-94e9-319d8cd7555b/NytgaffaStativDkCopy1-default.webp -- 1340x1832
return src.replace(/(\/gaffa-media\/+media\/+[-0-9a-f]{10,}\/+[^/]+-)(?:SMALL|MEDIUM|LARGE)\./, "$1default.");
}

if (domain === "ccdn.lezhin.com") {
// thanks to Froktime on github: https://github.com/qsniyg/maxurl/issues/1273
// https://ccdn.lezhin.com/v2/inventory_items/4514079591694336/media/upperBannerMobile.webp?updated=1675058642000&width=688
// https://ccdn.lezhin.com/v2/inventory_items/4514079591694336/media/upperBannerMobile
// https://ccdn.lezhin.com/v2/comics/6626593178189824/images/tall.webp?updated=1678868634586&width=354
// https://ccdn.lezhin.com/v2/comics/6626593178189824/images/tall
// https://ccdn.lezhin.com/v2/comics/6626593178189824/images/wide.webp?updated=1678868634586&width=800
// https://ccdn.lezhin.com/v2/comics/6626593178189824/images/wide
return src.replace(/(\/[0-9]+\/+(?:media|images)\/+[^/.?#]+)(?:\.[a-zA-Z0-9]+)?(?:[?#].*)?$/, "$1");
}

if (domain === "image.balcony.studio") {
// thanks to Froktime on github: https://github.com/qsniyg/maxurl/issues/1273
// https://image.balcony.studio/LEZHIN_ES/banner/2024/1706679627760.webp
// https://image.balcony.studio/LEZHIN_ES/banner/2024/1706679627760.png
// https://image.balcony.studio/es/co_thumbnail/daf_1000741/1706673426120.webp
// https://image.balcony.studio/es/co_thumbnail/daf_1000741/1706673426120.jpeg
// https://image.balcony.studio/es/co_thumbnail/LZ_3000041/1631786095698.webp
// https://image.balcony.studio/es/co_thumbnail/LZ_3000041/1631786095698.jpg
// doesn't work for all:
// https://image.balcony.studio/es/co_thumbnail/daf_1000741/1706673425903.webp
newsrc = src.replace(/(\/[0-9]+\.)webp(?:[?#].*)?$/, "$1jpg");
if (newsrc !== src)
return add_full_extensions(newsrc, ["png", "jpg", "jpeg"], true);
}




Expand Down
44 changes: 44 additions & 0 deletions userscript.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -37208,6 +37208,10 @@ var $$IMU_EXPORT$$;
// https://leftychan.net/hobby/thumb/1616876696039.png
// https://leftychan.net/hobby/src/1616876696039.png
domain_nowww === "leftychan.net" ||
// thanks to anonymous for reporting:
// https://anonimageboards.com/a/thumb/1706125797680.png
// https://anonimageboards.com/a/src/1706125797680.jpg
domain_nowww === "anonimageboards.com" ||
// https://lolcow.farm/ot/thumb/1530053186253.jpg
// https://lolcow.farm/ot/src/1530053186253.jpg
domain_nowww === "lolcow.farm") {
Expand Down Expand Up @@ -100432,6 +100436,46 @@ var $$IMU_EXPORT$$;
bad: "mask"
};
}
if (domain === "cdn-icons-png.flaticon.com") {
// thanks to anonymous for reporting:
// https://cdn-icons-png.flaticon.com/128/12766/12766209.png?fd=1 -- forces download
newsrc = remove_queries(src, ["fd"]);
if (newsrc !== src)
return newsrc;
// https://cdn-icons-png.flaticon.com/128/12766/12766209.png
// https://cdn-icons-png.flaticon.com/512/12766/12766209.png
return src.replace(/\/(?:32|64|128|256)\/+([0-9]+\/+[0-9]+\.)/, "/512/$1");
}
if (domain === "gaffa.blob.core.windows.net") {
// thanks to anonymous for reporting:
// https://gaffa.blob.core.windows.net/gaffa-media/media/62a39bf4-be8a-4272-94e9-319d8cd7555b/NytgaffaStativDkCopy1-SMALL.webp
// https://gaffa.blob.core.windows.net/gaffa-media/media/62a39bf4-be8a-4272-94e9-319d8cd7555b/NytgaffaStativDkCopy1-default.webp -- 1340x1832
return src.replace(/(\/gaffa-media\/+media\/+[-0-9a-f]{10,}\/+[^/]+-)(?:SMALL|MEDIUM|LARGE)\./, "$1default.");
}
if (domain === "ccdn.lezhin.com") {
// thanks to Froktime on github: https://github.com/qsniyg/maxurl/issues/1273
// https://ccdn.lezhin.com/v2/inventory_items/4514079591694336/media/upperBannerMobile.webp?updated=1675058642000&width=688
// https://ccdn.lezhin.com/v2/inventory_items/4514079591694336/media/upperBannerMobile
// https://ccdn.lezhin.com/v2/comics/6626593178189824/images/tall.webp?updated=1678868634586&width=354
// https://ccdn.lezhin.com/v2/comics/6626593178189824/images/tall
// https://ccdn.lezhin.com/v2/comics/6626593178189824/images/wide.webp?updated=1678868634586&width=800
// https://ccdn.lezhin.com/v2/comics/6626593178189824/images/wide
return src.replace(/(\/[0-9]+\/+(?:media|images)\/+[^/.?#]+)(?:\.[a-zA-Z0-9]+)?(?:[?#].*)?$/, "$1");
}
if (domain === "image.balcony.studio") {
// thanks to Froktime on github: https://github.com/qsniyg/maxurl/issues/1273
// https://image.balcony.studio/LEZHIN_ES/banner/2024/1706679627760.webp
// https://image.balcony.studio/LEZHIN_ES/banner/2024/1706679627760.png
// https://image.balcony.studio/es/co_thumbnail/daf_1000741/1706673426120.webp
// https://image.balcony.studio/es/co_thumbnail/daf_1000741/1706673426120.jpeg
// https://image.balcony.studio/es/co_thumbnail/LZ_3000041/1631786095698.webp
// https://image.balcony.studio/es/co_thumbnail/LZ_3000041/1631786095698.jpg
// doesn't work for all:
// https://image.balcony.studio/es/co_thumbnail/daf_1000741/1706673425903.webp
newsrc = src.replace(/(\/[0-9]+\.)webp(?:[?#].*)?$/, "$1jpg");
if (newsrc !== src)
return add_full_extensions(newsrc, ["png", "jpg", "jpeg"], true);
}
// -- general rules --
if (src.match(/\/ImageGen\.ashx\?/)) {
// http://www.lookalikes.info/umbraco/ImageGen.ashx?image=/media/97522/nick%20hewer%20-%20mark%20brown.jpeg&width=250&constrain=true
Expand Down

0 comments on commit f34dd0d

Please sign in to comment.