Skip to content

Commit

Permalink
Improve plurk rule (fixes #1330)
Browse files Browse the repository at this point in the history
  • Loading branch information
qsniyg committed Jun 2, 2024
1 parent 1d0c732 commit 8db63f7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/userscript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84268,9 +84268,12 @@ var $$IMU_EXPORT$$;
// thanks to Froktime on github: https://github.com/qsniyg/maxurl/issues/1262
// https://images.plurk.com/mx_1enwpR3JJbhoAUUpcpKb9Q.jpg
// https://images.plurk.com/1enwpR3JJbhoAUUpcpKb9Q.png
// thanksto Froktime on github: https://github.com/qsniyg/maxurl/issues/1330
// https://images.plurk.com/mx_3Bf8xiLf27TXtb3xf4g4Dd.jpg
// https://images.plurk.com/3Bf8xiLf27TXtb3xf4g4Dd.gif
newsrc = src.replace(/(^[a-z]+:\/\/[^/]*\/+)mx_([^/.]*\.[^/.]*)(?:[?#].*)?$/, "$1$2");
if (newsrc !== src)
return add_extensions(newsrc);
return add_full_extensions(newsrc, ["jpg", "png", "jpeg", "gif"]);
}

if (domain === "imgs.plurk.com") {
Expand Down
5 changes: 4 additions & 1 deletion userscript.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -75953,9 +75953,12 @@ var $$IMU_EXPORT$$;
// thanks to Froktime on github: https://github.com/qsniyg/maxurl/issues/1262
// https://images.plurk.com/mx_1enwpR3JJbhoAUUpcpKb9Q.jpg
// https://images.plurk.com/1enwpR3JJbhoAUUpcpKb9Q.png
// thanksto Froktime on github: https://github.com/qsniyg/maxurl/issues/1330
// https://images.plurk.com/mx_3Bf8xiLf27TXtb3xf4g4Dd.jpg
// https://images.plurk.com/3Bf8xiLf27TXtb3xf4g4Dd.gif
newsrc = src.replace(/(^[a-z]+:\/\/[^/]*\/+)mx_([^/.]*\.[^/.]*)(?:[?#].*)?$/, "$1$2");
if (newsrc !== src)
return add_extensions(newsrc);
return add_full_extensions(newsrc, ["jpg", "png", "jpeg", "gif"]);
}
if (domain === "imgs.plurk.com") {
// https://imgs.plurk.com/Qwz/DVj/SBPzYpEOYaYHuBNedfU3lNdZnlW_tn.jpg
Expand Down

0 comments on commit 8db63f7

Please sign in to comment.