diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 01da57a1..9d244c01 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,6 +1,6 @@ 2024.2.1 (in-dev) -Special thanks to rEnr3n for their contributions and reports for this release +Special thanks to rEnr3n, beeznutsonly for their contributions and reports for this release --- diff --git a/src/userscript.ts b/src/userscript.ts index 302745bd..0c56b325 100644 --- a/src/userscript.ts +++ b/src/userscript.ts @@ -3379,8 +3379,8 @@ var $$IMU_EXPORT$$; } }; - function is_element(x) { - if (!x || typeof x !== "object") + function is_element(x:any):boolean { + if (!x || typeof x !== "object" || is_array(x)) return false; if (("namespaceURI" in x) && ("nodeType" in x) && ("nodeName" in x) && ("childNodes" in x)) { @@ -3394,18 +3394,23 @@ var $$IMU_EXPORT$$; // very slow if (is_interactive) { - if ((x instanceof Node) || - (x instanceof Element) || - (x instanceof HTMLDocument) || - (x instanceof Window)) { - return true; + let objects = [Node, Element, HTMLDocument, Window]; + + for (let obj of objects) { + // some websites override Window + try { + if (x instanceof obj) + return true; + } catch (e) { + console_error(e); + } } } return false; } - function is_iterable_object(x) { + function is_iterable_object(x:any):boolean { return typeof x === "object" && x !== null && !is_array(x) && !is_element(x); } @@ -24693,7 +24698,6 @@ var $$IMU_EXPORT$$; console_error(cache_key, "Unable to find items in", resp); return null; } - var urls = []; for (var i = 0; i < match.length; i++) { var smatch = match[i].match(regex); @@ -24703,7 +24707,7 @@ var $$IMU_EXPORT$$; urls.push({ url: url, - quality: parse_int(quality), + quality: parse_int(quality.replace(/^([0-9]+)p$/, "$1")), video: true }); } @@ -46576,6 +46580,10 @@ var $$IMU_EXPORT$$; // https://simp6.jpg.church/images/testfcc38151209151b9.th.jpg // https://simp6.jpg.church/images/testfcc38151209151b9.jpg (domain_nosub === "jpg.church" && /^simp[0-9]*\./.test(domain)) || + // thanks to beeznutsonly on github: https://github.com/qsniyg/maxurl/issues/1274 + // https://simp6.host.church/images/testfcc38151209151b9.th.jpg + // https://simp6.host.church/images/testfcc38151209151b9.jpg + (domain_nosub === "host.church" && /^simp[0-9]*\./.test(domain)) || // thanks to vscum on github: https://github.com/qsniyg/maxurl/issues/1166 // https://photoloading.com/images/2023/01/28/6475687587.th.jpg // https://photoloading.com/images/2023/01/28/6475687587.jpg @@ -107037,8 +107045,12 @@ var $$IMU_EXPORT$$; } if (domain_nosub === "kemono.party" || + // thanks to beeznutsonly on github: https://github.com/qsniyg/maxurl/issues/1275 + domain_nosub === "kemono.su" || // thanks to vscum on github: https://github.com/qsniyg/maxurl/pull/1137 - domain_nosub === "coomer.party") { + domain_nosub === "coomer.party" || + // thanks to beeznutsonly on github: https://github.com/qsniyg/maxurl/issues/1276 + domain_nosub === "coomer.su") { // thanks to BrandonKMLee on github: https://github.com/qsniyg/maxurl/issues/1093 // https://kemono.party/thumbnail/data/30/34/3034877e08c6b13c03db53879464858ae4a4f8f2360c7755d16a241a2613e12c.png // https://data65.kemono.party/data/30/34/3034877e08c6b13c03db53879464858ae4a4f8f2360c7755d16a241a2613e12c.png diff --git a/userscript.user.js b/userscript.user.js index 7c1b168d..dce30241 100644 --- a/userscript.user.js +++ b/userscript.user.js @@ -2682,7 +2682,7 @@ var $$IMU_EXPORT$$; } }; function is_element(x) { - if (!x || typeof x !== "object") + if (!x || typeof x !== "object" || is_array(x)) return false; if (("namespaceURI" in x) && ("nodeType" in x) && ("nodeName" in x) && ("childNodes" in x)) { return true; @@ -2693,11 +2693,16 @@ var $$IMU_EXPORT$$; } // very slow if (is_interactive) { - if ((x instanceof Node) || - (x instanceof Element) || - (x instanceof HTMLDocument) || - (x instanceof Window)) { - return true; + var objects = [Node, Element, HTMLDocument, Window]; + for (var _i = 0, objects_1 = objects; _i < objects_1.length; _i++) { + var obj = objects_1[_i]; + // some websites override Window + try { + if (x instanceof obj) + return true; + } catch (e) { + console_error(e); + } } } return false; @@ -22687,7 +22692,7 @@ var $$IMU_EXPORT$$; var url = decode_entities(smatch[2]); urls.push({ url: url, - quality: parse_int(quality), + quality: parse_int(quality.replace(/^([0-9]+)p$/, "$1")), video: true }); } @@ -42514,6 +42519,10 @@ var $$IMU_EXPORT$$; // https://simp6.jpg.church/images/testfcc38151209151b9.th.jpg // https://simp6.jpg.church/images/testfcc38151209151b9.jpg (domain_nosub === "jpg.church" && /^simp[0-9]*\./.test(domain)) || + // thanks to beeznutsonly on github: https://github.com/qsniyg/maxurl/issues/1274 + // https://simp6.host.church/images/testfcc38151209151b9.th.jpg + // https://simp6.host.church/images/testfcc38151209151b9.jpg + (domain_nosub === "host.church" && /^simp[0-9]*\./.test(domain)) || // thanks to vscum on github: https://github.com/qsniyg/maxurl/issues/1166 // https://photoloading.com/images/2023/01/28/6475687587.th.jpg // https://photoloading.com/images/2023/01/28/6475687587.jpg @@ -96077,8 +96086,12 @@ var $$IMU_EXPORT$$; } } if (domain_nosub === "kemono.party" || + // thanks to beeznutsonly on github: https://github.com/qsniyg/maxurl/issues/1275 + domain_nosub === "kemono.su" || // thanks to vscum on github: https://github.com/qsniyg/maxurl/pull/1137 - domain_nosub === "coomer.party") { + domain_nosub === "coomer.party" || + // thanks to beeznutsonly on github: https://github.com/qsniyg/maxurl/issues/1276 + domain_nosub === "coomer.su") { // thanks to BrandonKMLee on github: https://github.com/qsniyg/maxurl/issues/1093 // https://kemono.party/thumbnail/data/30/34/3034877e08c6b13c03db53879464858ae4a4f8f2360c7755d16a241a2613e12c.png // https://data65.kemono.party/data/30/34/3034877e08c6b13c03db53879464858ae4a4f8f2360c7755d16a241a2613e12c.png