diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 2e21776b..3032fac6 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,7 +1,8 @@ -2024.2.2 +2024.3.0 New features: + * Support for ~45 new websites (using ~30 new rules) * Option to enable faster speeds on YouTube (disabled by default) Improvements: diff --git a/build/ImageMaxURL_crx3.crx b/build/ImageMaxURL_crx3.crx index f867515e..ac31d189 100644 Binary files a/build/ImageMaxURL_crx3.crx and b/build/ImageMaxURL_crx3.crx differ diff --git a/build/ImageMaxURL_unsigned.xpi b/build/ImageMaxURL_unsigned.xpi index 25a7bf5d..b6847265 100644 Binary files a/build/ImageMaxURL_unsigned.xpi and b/build/ImageMaxURL_unsigned.xpi differ diff --git a/build/userscript_extr.user.js b/build/userscript_extr.user.js index 77de3ec6..22a9d9bf 100644 --- a/build/userscript_extr.user.js +++ b/build/userscript_extr.user.js @@ -64,7 +64,7 @@ // @description:zh-TW 為9200多個網站查找更大或原始圖像 // @description:zh-HK 為9200多個網站查找更大或原始圖像 // @namespace http://tampermonkey.net/ -// @version 2024.2.1 +// @version 2024.3.0 // @author qsniyg // @homepageURL https://qsniyg.github.io/maxurl/options.html // @supportURL https://github.com/qsniyg/maxurl/issues @@ -100,7 +100,7 @@ // Note that jsdelivr.net might not always be reliable, but (AFAIK) this is the only reasonable option from what greasyfork allows. // I'd recommend using the Github version of the script if you encounter any issues (linked in the 'Project links' section below). // -// @require https://cdn.jsdelivr.net/gh/qsniyg/maxurl@49ebcffb4d721c422fa3f98c1163e1e31103b115/build/rules.js +// @require https://cdn.jsdelivr.net/gh/qsniyg/maxurl@928e90b53b6b9e26521a23b4a3541a724e37f4d4/build/rules.js // ==/UserScript== // If you see "A userscript wants to access a cross-origin resource.", it's used for: // * Detecting whether or not the destination URL exists before redirecting @@ -173,7 +173,7 @@ var $$IMU_EXPORT$$; //var greasyfork_update_url = "https://greasyfork.org/scripts/36662-image-max-url/code/Image%20Max%20URL.user.js"; var github_issues_page = "https://github.com/qsniyg/maxurl/issues"; var imu_icon = "https://raw.githubusercontent.com/qsniyg/maxurl/b5c5488ec05e6e2398d4e0d6e32f1bbad115f6d2/resources/logo_256.png"; - var current_version = "2024.2.1"; + var current_version = "2024.3.0"; var imagetab_ok_override = false; var has_ffmpeg_lib = true; // -- Currently this is unused, it'll be used in a future release (to workaround the 1MB and 2MB limits for OUJS and Greasyfork respectively) -- @@ -6521,6 +6521,7 @@ var $$IMU_EXPORT$$; tumblr_api_key: base64_decode("IHhyTXBMTThuMWVDZUwzb1JZU1pHN0NMQUx3NkVIaFlEZFU2V3E1ZUQxUGJNa2xkN1kx").substr(1), // thanks to modelfe on github for the idea: https://github.com/qsniyg/maxurl/issues/639 twitter_use_ext: false, + youtube_replace_n: false, // thanks to LukasThyWalls on github for the idea: https://github.com/qsniyg/maxurl/issues/75 bigimage_blacklist: "", bigimage_blacklist_mode: "blacklist", @@ -9731,6 +9732,16 @@ var $$IMU_EXPORT$$; subcategory: "rule_specific", onupdate: update_rule_setting }, + youtube_replace_n: { + name: "YouTube: Enable faster speeds", + description: "Increases the download bandwidth for YouTube videos by replacing the `n` parameter. Note that this may execute untrusted Javascript.", + requires: { + allow_thirdparty_libs: true + }, + category: "rules", + subcategory: "rule_specific", + onupdate: update_rule_setting + }, bigimage_blacklist: { name: "Media blacklist", description: "A list of URLs (one per line) that are blacklisted from being processed", @@ -12110,6 +12121,14 @@ var $$IMU_EXPORT$$; size: 21482, crc32: 337445473, crc32_size: 2641711624 + }, + "JSInterpreter": { + name: "acorn_interpreter", + url: "https://raw.githubusercontent.com/qsniyg/maxurl/b4d3d715e391e2e3f50a699acc5711bc7bdb6f52/lib/acorn_interpreter.js", + archive_time: "20240311233145", + size: 79532, + crc32: 270556316, + crc32_size: 2713590225 } }; var get_library = function(name, options, do_request, cb) { @@ -17644,6 +17663,7 @@ var $$IMU_EXPORT$$; 'Math_max': Math_max, 'Math_min': Math_min, 'Math_abs': Math_abs, + 'Math_pow': Math_pow, 'get_random_text': get_random_text, 'console_log': console_log, 'console_error': console_error, @@ -17762,13 +17782,13 @@ var $$IMU_EXPORT$$; data: bigimage_obj, message: "Unable to get bigimage function" }; - } else if (bigimage_obj.nonce !== "21h13lg2012lpa17") { + } else if (bigimage_obj.nonce !== "ojimdb21e5e0k1op") { // This could happen if for some reason the userscript manager updates the userscript, // but not the required libraries. require_rules_failed = { type: "bad_nonce", data: bigimage_obj.nonce, - message: "Bad nonce, expected: " + "21h13lg2012lpa17" + message: "Bad nonce, expected: " + "ojimdb21e5e0k1op" }; } else { bigimage = bigimage_obj.bigimage; @@ -18805,6 +18825,38 @@ var $$IMU_EXPORT$$; } }; } + // myportfolio + if (host_domain_nowww === "kalyanyasaswi.com") { + // thanks to anonymous for reporting: + return { + element_ok: function(el) { + if (el.tagName.toUpperCase() === "SPAN" && el.classList.contains("grid__item-filler")) { + var prev = el.previousElementSibling; + if (prev && prev.tagName.toUpperCase() === "IMG" && prev.classList.contains("grid__item-image")) + return prev; + } + } + }; + } + if (host_domain === "open.spotify.com") { + // thanks to anonymous for reporting: + // public lists on spotify user profiles + return { + element_ok: function(el) { + if (el.getAttribute("data-testid") === "card-click-handler") { + var prev = el.previousElementSibling; + if (prev) + prev = prev.previousElementSibling; + if (prev && prev.tagName === "DIV") { + return { + el: prev, + search: true + }; + } + } + } + }; + } return null; }; var _get_album_info_gallery = function(album_info, el, nextprev) { @@ -18977,6 +19029,7 @@ var $$IMU_EXPORT$$; "tiktok_thirdparty": true, "tumblr_api_key": true, "twitter_use_ext": true, + "youtube_replace_n": true, "mouseover_linked_image": "linked_image" }; for (var rule_specific in rule_specific_map) { diff --git a/build/userscript_extr_min.user.js b/build/userscript_extr_min.user.js index 1bbef7db..2dee2c10 100644 --- a/build/userscript_extr_min.user.js +++ b/build/userscript_extr_min.user.js @@ -62,7 +62,7 @@ // @description:zh-TW 為9200多個網站查找更大或原始圖像 // @description:zh-HK 為9200多個網站查找更大或原始圖像 // @namespace http://tampermonkey.net/ -// @version 2024.2.1 +// @version 2024.3.0 // @author qsniyg // @homepageURL https://qsniyg.github.io/maxurl/options.html // @supportURL https://github.com/qsniyg/maxurl/issues @@ -98,7 +98,7 @@ // Note that jsdelivr.net might not always be reliable, but (AFAIK) this is the only reasonable option from what greasyfork allows. // I'd recommend using the Github version of the script if you encounter any issues (linked in the 'Project links' section below). // -// @require https://cdn.jsdelivr.net/gh/qsniyg/maxurl@49ebcffb4d721c422fa3f98c1163e1e31103b115/build/rules.js +// @require https://cdn.jsdelivr.net/gh/qsniyg/maxurl@928e90b53b6b9e26521a23b4a3541a724e37f4d4/build/rules.js // ==/UserScript== // Due to OpenUserJS's 1MB limit, the source code had to be minified. @@ -107,4 +107,4 @@ // You can view the original source code here: https://github.com/qsniyg/maxurl/blob/master/userscript.user.js // Please let me know if you have any questions or concerns regarding the script. -var $$IMU_EXPORT$$;!function(){function zi(){}function Ni(){var e=d();return e.self||e}function Si(e){if(s||!bi.imu_enabled)return!0;if(e&&Zr)try{chrome.runtime.getURL("manifest.json")}catch(e){return Ui(!0),!0}return!1}var t,Yr=!1,Zr=(Yr&&(Yr={no_request:!1,no_recurse:!1,no_redirect:!0,map:!1,cache:!1,bigimage_recursive:!0,input:!1,check_image_get:!1,find_source:!1},console.log("Loaded")),!1),o=!1,r=!1,Kr=null,i=function(e){},s=!1,P=!1,qi=!1,n=!1,Jr=null,b="https://qsniyg.github.io/maxurl/options.html",a=b,l="https://addons.mozilla.org/en-US/firefox/addon/image-max-url/",u="https://raw.githubusercontent.com/qsniyg/maxurl/master/userscript_smaller.user.js",Ti="https://github.com/qsniyg/maxurl/issues",H="2024.2.1",Ii=!1,Ai=!0,c=!1,d=function(){return"undefined"!=typeof unsafeWindow?unsafeWindow||this.window||window:this.window||window},Ei=[],Ui=function(e){var t=s;(s=e)&&!t&&mi(Ei,function(e){e()})};try{Jr=window.location.href,E=Jr.replace(/^[a-z]+:\/\/web\.archive\.org\/+web\/+[0-9]+\/+(https?:\/\/)/,"$1"),/^https?:\/\/qsniyg\.github\.io\/+maxurl\/+options\.html/.test(E)||/^file:\/\/.*\/maxurl\/site\/options\.html/.test(Jr)?n=qi=!0:(/^https?:\/\/qsniyg\.github\.io\/+maxurl\/+/.test(E)||/^file:\/\/.*\/maxurl\/site\/(?:index|about|options)\.html/.test(Jr))&&(n=!0)}catch(e){}!function(){if("object"==typeof chrome&&chrome&&"object"==typeof chrome.runtime)try{var e=chrome.runtime.getManifest();if(!(Zr="Image Max URL"===e.name))return;i=function(e){try{var t=chrome.runtime.lastError;t&&console.error(t.message,e)}catch(e){console.error(e)}},o=/^([-a-z]+)extension:\/\/[^/]+\/+_generated_background_page\.html/.test(Jr),t=chrome.runtime.getURL("extension/options.html"),P=Jr.replace(/[?#].*$/,"")===t,qi=qi||P,a=t,0<=navigator.userAgent.indexOf("Firefox")&&(r=!0),H=e.version,Kr=function(e,t){return e=_i(e,{json:!0}),t=t||zi,o?userscript_extension_message_handler(e,t):t&&t!==zi?chrome.runtime.sendMessage(null,e,null,function(){return i(e),t.apply(this,arguments)}):chrome.runtime.sendMessage(null,e)},o||setTimeout(function(){chrome.runtime.connect().onDisconnect.addListener(function(e){console.error(e),i(),Ui(!0)})},10),i()}catch(e){Zr&&(console.error(e),i())}}();var p=!1,m=!1;if("undefined"!=typeof module&&module.exports&&"undefined"==typeof window&&"undefined"==typeof document){p=!0;try{require.main===module&&(m=!0)}catch(e){}}var h=!1,_e=("undefined"!=typeof imu_variable&&"undefined"==typeof GM_xmlhttpRequest&&"undefined"==typeof GM&&(h=!0),!1),Qr=(p||h||Zr||(_e=!0),function(){try{return window.self!==window.top}catch(e){return!0}}()),f=!1,v=(Zr||_e)&&!o,y="unknown",_="";if(_e){var w=void 0;"function"==typeof GM_info?w=GM_info():"object"==typeof GM_info&&(w=GM_info),"object"==typeof w?(w.scriptHandler&&(y=w.scriptHandler),w.version&&(_=w.version)):"function"==typeof GM_fetch&&null===w&&(w={scriptHandler:y="FireMonkey"});try{H=w.script.version}catch(e){H=null}}function k(e){return U(e,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_")}var ei,x,C,ti,oi,ri,z,N,Ri,ii,Li,S,q,T,I,ni,A=console.log,ai=function(){for(var e=0;e>>(a-=8)&255)||o>4&15)+(ae>>i%8&15))%e+se.op_start;0<=oi(t,n)?r++:o.push([n,(255&ae)+i,((15&ae)+i)%5])}var a=gi.create_vm_ops(o);try{var s=parseFloat(se.run(a,ae+""));isNaN(s)||(ae+=s)}catch(e){}}return(ae=(ae+Date.now())%1e8)/1e8},di=function(){for(var e=-1/0,t=0;tblob:",_i(e),i),p(i)}var o,r,i=e;e.response?(o=null,Zr&&"_responseEncoded"in e&&e._responseEncoded.type?o=e._responseEncoded.type:e.responseHeaders&&(r=jn(Dn(e.responseHeaders)))["content-type"]&&(o=r["content-type"]),r=void(i=mn(e)),Ri(e.response,function(e){i.response=e,t()},r=o?{type:o}:r)):t()},r.responseType="arraybuffer",r.imu_responseType="blob"),Yr&&ai("do_request (modified data):",_i(r)),h(r)}:v&&console.warn("Unable to initialize do_request, most functions will likely fail"),function(e){return bi.filename_replace_special_underscores?e.replace(/["<>/:?\\*|\^]/g,"_"):e}),Ie=function(e,t,o){Yr&&ai("do_browser_download",e,t,o);var r=ni("a");r.href=e.url,t&&0=o)return c(e);"content-type"in t&&(g=t["content-type"]),d&&(p.total_size=o);for(var r=[],i=e.response.byteLength;;i+=f){var n=[i],a=!0;if(f`":{ko:"