From 8db63f757748d64899d21c43856744c93f1122ca Mon Sep 17 00:00:00 2001 From: qsniyg Date: Sun, 2 Jun 2024 19:00:49 +0000 Subject: [PATCH] Improve plurk rule (fixes #1330) --- src/userscript.ts | 5 ++++- userscript.user.js | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/userscript.ts b/src/userscript.ts index 3e852b3e..e99aa156 100644 --- a/src/userscript.ts +++ b/src/userscript.ts @@ -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") { diff --git a/userscript.user.js b/userscript.user.js index 75247cd2..277a54f5 100644 --- a/userscript.user.js +++ b/userscript.user.js @@ -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