Skip to content

Commit

Permalink
More websites/rules
Browse files Browse the repository at this point in the history
  • Loading branch information
qsniyg committed Oct 18, 2024
1 parent 511d1da commit 3d38843
Show file tree
Hide file tree
Showing 3 changed files with 228 additions and 61 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Improvements:

* Various improvements/fixes to existing rules (including YouTube)

Special thanks to nimbuz, remlap, Solus, immewnity, Froktime, billkewl, Broly, fyhtma, vscum, acidzab, sn3akyb3ar, ValiumBear, fireattack, NeverForgotten, liamengland1 for their contributions and reports for this release
Special thanks to nimbuz, remlap, Solus, immewnity, Froktime, billkewl, Broly, fyhtma, vscum, acidzab, sn3akyb3ar, ValiumBear, fireattack, NeverForgotten, liamengland1, mantou for their contributions and reports for this release

---

Expand Down
97 changes: 93 additions & 4 deletions src/userscript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29996,6 +29996,10 @@ var $$IMU_EXPORT$$;
// https://images.tennis.com/image/private/t_16-9_768/f_auto/tenniscom-prd/in1ds81hd2ufj4gomffx.jpg
// https://images.tennis.com/image/private/f_png/tenniscom-prd/in1ds81hd2ufj4gomffx.jpg
domain === "images.tennis.com" ||
// thanks to anonymous for reporting:
// https://images.crunchbase.com/image/upload/c_pad,h_512,w_512,f_auto,b_white,q_auto:eco,dpr_2/gjtsg7wocebhdu7bzf6v
// https://images.crunchbase.com/image/upload/gjtsg7wocebhdu7bzf6v
domain === "images.crunchbase.com" ||
// thanks to karpuzikov on github: https://github.com/qsniyg/maxurl/issues/1066
// https://resource.logitechg.com/w_677,ar_1:1,c_limit,b_rgb:2f3132,q_auto,f_auto,dpr_auto/d_transparent.gif/content/dam/gaming/en/homepage/product-swatch-carousel/home-product-swatch-4.png?v=1
// https://resource.logitechg.com/content/dam/gaming/en/homepage/product-swatch-carousel/home-product-swatch-4.png?v=1
Expand Down Expand Up @@ -63791,6 +63795,8 @@ var $$IMU_EXPORT$$;
domain_nowww === "fpo.xxx" ||
domain_nowww === "masturbationgirl.com" ||
domain_nowww === "xhomealone.com" ||
domain_nosub === "porntrex.com" ||
domain_nosub === "cdntrex.com" ||
// different system
// https://static2.tubepornclassic.com/contents/videos_screenshots/1051000/1051741/240x180/1.jpg
//domain_nosub === "tubepornclassic.com" ||
Expand Down Expand Up @@ -63881,8 +63887,9 @@ var $$IMU_EXPORT$$;
if (domain_nosub === "porntrex.com" || domain_nosub === "cdntrex.com") {
basedomain = "https://www.porntrex.com/";
cache_host = "porntrex.com";
videos_component = "video";
videos_component = "embed";
addslash = "";
a_component = "";
} else if (domain_nosub === "porntb.com" ||
domain_nosub === "pornstarsadvice.com" ||
domain_nosub === "fetishburg.com" ||
Expand Down Expand Up @@ -65154,6 +65161,8 @@ var $$IMU_EXPORT$$;
// https://apple.thub.lol/contents/albums/main/200x150/26000/26263/1041436.jpg
// https://apple.thub.lol/contents/albums/sources/26000/26263/1041436.jpg
(domain_nosub === "thub.lol" && /\/contents\/+albums\//.test(src)) ||
// thanks to anonymous for reporting:
domain === "39f3590d4b98d6338eaee9d88.blazincdn.com" ||
// https://cdn.pornstill.com/contents/albums/main/300x500/82000/82628/1298509.jpg
// https://cdn.pornstill.com/contents/albums/sources/82000/82628/1298509.jpg
domain === "cdn.pornstill.com") {
Expand Down Expand Up @@ -90416,6 +90425,45 @@ var $$IMU_EXPORT$$;
}
},
process: function(done, resp, cache_key) {
let matches = match_all(resp.responseText, /<source id='big-pic-[a-z]+' srcset='(\/\/b[0-9]+\.[^'"]+)'/);
if (!matches) {
console_error(cache_key, "Unable to find image match for", resp);
return done(null, false);
}

let images = [];
for (let match of matches) {
images.push(urljoin(resp.finalUrl, decode_entities(match[1]), true));
}

images.sort((a, b) => {
if (/\.webp$/.test(a))
return 1;
if (/\.webp$/.test(b))
return -1;

return 0;
});

let captionmatch = resp.responseText.match(/<img src='[^']+'[^>]* class='big'[^>]* alt='([^'"]+)'/);
let caption = null
if (!captionmatch) {
console_warn(cache_key, "Unable to find caption match for", resp);
} else {
caption = decode_entities(captionmatch[1]);
}

let result = fillobj_urls(images, {
extra: {
caption,
page: resp.finalUrl
}
});

return done(result, 6*60*60);
},
// kept only for reference
_process_old: function(done, resp, cache_key) {
var match = resp.responseText.match(/<img class='big' src='(\/\/s[0-9]+\.[^'"]+)' alt='([^'"]+)'/);
if (!match) {
console_error(cache_key, "Unable to find image match for", resp);
Expand Down Expand Up @@ -96316,6 +96364,14 @@ var $$IMU_EXPORT$$;
// atob:
// = {"bucket":"arena_images","key":"27904864/original_b8ecae8f78e235bfebcc9ae013b0a907.jpg","edits":{"resize":{"width":2400,"height":2400,"fit":"inside","withoutEnlargement":true},"webp":{"quality":65},"jpeg":{"quality":65},"rotate":null}}
domain === "images.are.na" ||
// thanks to mantou on discord:
// https://cdn.gamerch.com/resize/eyJidWNrZXQiOiJnYW1lcmNoLWltZy1jb250ZW50cyIsImtleSI6Indpa2lcLzM4MjNcL2VudHJ5XC8xNjQ3MzE0MDk2LmpwZyIsImVkaXRzIjp7IndlYnAiOnsicXVhbGl0eSI6ODV9LCJ0b0Zvcm1hdCI6IndlYnAiLCJyZXNpemUiOnsid2lkdGgiOjIwMCwiZml0IjoiY292ZXIifX19
// https://cdn.gamerch.com/resize/eyJidWNrZXQiOiJnYW1lcmNoLWltZy1jb250ZW50cyIsImtleSI6Indpa2kvMzgyMy9lbnRyeS8xNjQ3MzE0MDk2LmpwZyJ9
// https://gamerch-img-contents.s3.amazonaws.com/wiki/3823/entry/1647314096.jpg
// https://cdn.gamerch.com/contents/wiki/3823/entry/1647314096.jpg
// atob:
// = {"bucket":"gamerch-img-contents","key":"wiki\/3823\/entry\/1647314096.jpg","edits":{"webp":{"quality":85},"toFormat":"webp","resize":{"width":200,"fit":"cover"}}}
domain === "cdn.gamerch.com" ||
// thanks to anonymous for reporting:
// https://images.ams-prd.blv.cloud/eyJidWNrZXQiOiJpbWFnZXMtcHJkLTFvNHV6OXpieHd6cDF1Ym0iLCJrZXkiOiJkYTkwNjE5Yy0yOGVkLTRjMDYtOTkzNi03Y2EzNGE1NjI1MzQiLCJlZGl0cyI6eyJyZXNpemUiOnsid2lkdGgiOjM2MCwiaGVpZ2h0IjozNjB9fX0=
// https://images.ams-prd.blv.cloud/eyJidWNrZXQiOiJpbWFnZXMtcHJkLTFvNHV6OXpieHd6cDF1Ym0iLCJrZXkiOiJkYTkwNjE5Yy0yOGVkLTRjMDYtOTkzNi03Y2EzNGE1NjI1MzQifQ==
Expand All @@ -96326,15 +96382,28 @@ var $$IMU_EXPORT$$;
// https://d1iiivw74516uk.cloudfront.net/eyJidWNrZXQiOiJwcmVzdG8tY292ZXItaW1hZ2VzIiwia2V5IjoiODE3OTQzMy4xLmpwZyIsInRpbWVzdGFtcCI6MTQ3NjEwNTEyNH0=
// atob:
// = {"bucket":"presto-cover-images","key":"8179433.1.jpg","edits":{"resize":{"width":300},"jpeg":{"quality":65},"toFormat":"jpeg"},"timestamp":1476105124}
match = src.match(/^[a-z]+:\/\/[^/]+\/+([^-_/.]{20,})(?:[?#].*)?$/);
match = src.match(/^([a-z]+:\/\/[^/]+\/+(?:resize\/+)?)([^-_/.]{20,})(?:[?#].*)?$/);
if (match) {
let orig_map = {
"cdn.gamerch.com": "https://cdn.gamerch.com/contents/"
};

try {
var decoded = base64_decode(match[1]);
let host = match[1];
let decoded = base64_decode(match[2]);
var json = JSON_parse(decoded);

delete json.edits;

return "https://" + domain + "/" + base64_encode(JSON_stringify(json));
let urls = [];

if (domain in orig_map) {
urls.push(orig_map[domain] + json.key);
}

urls.push(host + base64_encode(JSON_stringify(json)));

return urls;
} catch (e) {
console_error(e);
}
Expand Down Expand Up @@ -116814,6 +116883,26 @@ var $$IMU_EXPORT$$;
return src.replace(/(:\/\/[^/]+\/+)(?:xs|sm|md)-/, "$1lg-");
}

if (domain === "lain.bgm.tv") {
// thanks to anonymous for reporting
// https://lain.bgm.tv/r/400/pic/cover/l/be/b4/313495_oVVzV.jpg
// https://lain.bgm.tv/pic/cover/l/be/b4/313495_oVVzV.jpg
// https://lain.bgm.tv/pic/cover/s/be/b4/313495_oVVzV.jpg
// https://lain.bgm.tv/pic/cover/l/be/b4/313495_oVVzV.jpg
// https://lain.bgm.tv/r/100x100/pic/cover/l/19/08/513530_Tj6ZC.jpg
// https://lain.bgm.tv/pic/cover/l/19/08/513530_Tj6ZC.jpg
return src
.replace(/(:\/\/[^/]+\/+pic\/+cover\/+)[sm]\/+/, "$1l/")
.replace(/(:\/\/[^/]+\/+)r\/+[0-9]+(?:x[0-9]+)?\/+/, "$1");
}

if (domain === "7e976cce9a89fb6e94ae-41f429bd6382725167ffe9004a84287b.ssl.cf1.rackcdn.com") {
// thanks to anonymous for reporting:
// https://7e976cce9a89fb6e94ae-41f429bd6382725167ffe9004a84287b.ssl.cf1.rackcdn.com/dxthm1000.LT_091118_2149Double.jpg
// https://7e976cce9a89fb6e94ae-41f429bd6382725167ffe9004a84287b.ssl.cf1.rackcdn.com/LT_091118_2149Double.jpg
return src.replace(/\/dxthm[0-9]+\.([^/]+)(?:[?#].*)?$/, "/$1");
}




Expand Down
Loading

0 comments on commit 3d38843

Please sign in to comment.