Skip to content

Commit

Permalink
Improve ppstatic.pl rule (fixes #1396)
Browse files Browse the repository at this point in the history
  • Loading branch information
qsniyg committed Jan 22, 2025
1 parent dfb8892 commit 4912361
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Improvements:

* Various improvements/fixes to existing rules (including Flickr, Twitch)

Special thanks to arlenestrigger, fyhtma, BlindWanda, chr1sx, James Joint, musicianjam888 for their contributions and reports for this release
Special thanks to arlenestrigger, fyhtma, BlindWanda, chr1sx, James Joint, musicianjam888, Velocidensity for their contributions and reports for this release

---

Expand Down
9 changes: 9 additions & 0 deletions src/userscript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82741,6 +82741,15 @@ var $$IMU_EXPORT$$;
}

if (domain_nosub === "ppstatic.pl") {
// thanks to Velocidensity on github for reporting: https://github.com/qsniyg/maxurl/issues/1396
// https://d-pa.ppstatic.pl/frames/pa-def/ae/f8/il20250117_889278375_large.jpg
// https://d-pa.ppstatic.pl/frames/pa-def/ae/f8/il20250117_889278375_original.jpg
// https://d-pa.ppstatic.pl/frames/pa-def/2b/e1/il20250118_889525635_xlarge.jpg
// https://d-pa.ppstatic.pl/frames/pa-def/2b/e1/il20250118_889525635_original.jpg
newsrc = src.replace(/(\/il[0-9]+_[0-9]+)_[a-z]+\./, "$1_original.");
if (newsrc !== src)
return newsrc;

// https://d-pt.ppstatic.pl/kadry/k/r/1/ec/34/5cfe1c641cc1a_o,size,445x270,q,71,h,b9f944.jpg
// https://d-pt.ppstatic.pl/kadry/k/r/1/ec/34/5cfe1c641cc1a_o.jpg -- 1920x1080
return src.replace(/(\/[^/.,]*)(?:,(?:size|[whq]),[^/,.]*){1,}(\.[^/.]*)(?:[?#].*)?$/, "$1$2");
Expand Down
8 changes: 8 additions & 0 deletions userscript.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -74747,6 +74747,14 @@ var $$IMU_EXPORT$$;
return add_http(newsrc);
}
if (domain_nosub === "ppstatic.pl") {
// thanks to Velocidensity on github for reporting: https://github.com/qsniyg/maxurl/issues/1396
// https://d-pa.ppstatic.pl/frames/pa-def/ae/f8/il20250117_889278375_large.jpg
// https://d-pa.ppstatic.pl/frames/pa-def/ae/f8/il20250117_889278375_original.jpg
// https://d-pa.ppstatic.pl/frames/pa-def/2b/e1/il20250118_889525635_xlarge.jpg
// https://d-pa.ppstatic.pl/frames/pa-def/2b/e1/il20250118_889525635_original.jpg
newsrc = src.replace(/(\/il[0-9]+_[0-9]+)_[a-z]+\./, "$1_original.");
if (newsrc !== src)
return newsrc;
// https://d-pt.ppstatic.pl/kadry/k/r/1/ec/34/5cfe1c641cc1a_o,size,445x270,q,71,h,b9f944.jpg
// https://d-pt.ppstatic.pl/kadry/k/r/1/ec/34/5cfe1c641cc1a_o.jpg -- 1920x1080
return src.replace(/(\/[^/.,]*)(?:,(?:size|[whq]),[^/,.]*){1,}(\.[^/.]*)(?:[?#].*)?$/, "$1$2");
Expand Down

0 comments on commit 4912361

Please sign in to comment.