From 9d9c27e7620d30bb18396a05da8e17f4b3f715ad Mon Sep 17 00:00:00 2001 From: qsniyg Date: Tue, 13 Aug 2024 08:40:15 +0000 Subject: [PATCH] More websites/rules --- src/userscript.ts | 19 ++++++++++++++----- userscript.user.js | 19 ++++++++++++++----- 2 files changed, 28 insertions(+), 10 deletions(-) diff --git a/src/userscript.ts b/src/userscript.ts index 213eaf41..4143b23c 100644 --- a/src/userscript.ts +++ b/src/userscript.ts @@ -30640,7 +30640,8 @@ var $$IMU_EXPORT$$; if (newsrc) return newsrc; } - if (domain_nowww === "twitter.com") { + if (domain_nowww === "twitter.com" || + domain_nowww === "x.com") { // https://github.com/qsniyg/maxurl/issues/243 // https://twitter.com/NoMansSky/status/1325458262800683009 var _query_twitter_webapi = function(url, cookies, cb) { @@ -30690,7 +30691,7 @@ var $$IMU_EXPORT$$; var query_twitter_webapi = function(url, cb) { if (options.get_cookies) { - options.get_cookies("https://www.twitter.com/", function(cookies) { + options.get_cookies("https://www.x.com/", function(cookies) { if (cookies) cookies = headers_list_to_dict(cookies); _query_twitter_webapi(url, cookies, cb); }); @@ -30762,7 +30763,7 @@ var $$IMU_EXPORT$$; if (users && tweet.id_str && tweet.user_id_str) { var username = users[tweet.user_id_str].screen_name; obj.extra.author_username = username; - obj.extra.page = "https://twitter.com/" + username + "/status/" + tweet.id_str; + obj.extra.page = "https://x.com/" + username + "/status/" + tweet.id_str; } if (tweet.full_text) { @@ -30968,7 +30969,7 @@ var $$IMU_EXPORT$$; if (newsrc) return newsrc; } - if (host_domain_nowww === "twitter.com" && options.element) { + if ((host_domain_nowww === "twitter.com" || host_domain_nowww === "x.com") && options.element) { var tweet_link = common_functions["get_twitter_tweet_link"](options.element); page_nullobj = null; @@ -33205,6 +33206,9 @@ var $$IMU_EXPORT$$; // thanks to James Joint on discord: // https://images.kerrangcdn.com/images/2023/05/NessaBarrett-JamieLeeTaete-2023-9.jpg?auto=compress&fit=max&w=640 domain === "images.kerrangcdn.com" || + // thanks to anonymous for reporting: + // https://cso.org/media/ls1fzrky/kelliohara_1500x1125_v2.jpg?anchor=center&mode=crop&width=1440&height=795&format=jpg&quality=85&rnd=132965911799130000 + (domain_nowww === "cso.org" && /\/media\//.test(src)) || // http://us.jimmychoo.com/dw/image/v2/AAWE_PRD/on/demandware.static/-/Sites-jch-master-product-catalog/default/dw70b1ebd2/images/rollover/LIZ100MPY_120004_MODEL.jpg?sw=245&sh=245&sm=fit // https://www.aritzia.com/on/demandware.static/-/Library-Sites-Aritzia_Shared/default/dw3a7fef87/seasonal/ss18/ss18-springsummercampaign/ss18-springsummercampaign-homepage/hptiles/tile-wilfred-lrg.jpg src.match(/\/demandware\.static\//) || @@ -34213,6 +34217,10 @@ var $$IMU_EXPORT$$; } if ((domain === "store.pinseyun.com" && string_indexof(src, "/uploads/") >= 0) || + // thanks to anonymous for reporting: + // https://s3.manualzz.com/store/data/019683962_1-63c5f7e3eec5b6a39772d3cb21b7e749-360x466.png + // https://s3.manualzz.com/store/data/019683962_1-63c5f7e3eec5b6a39772d3cb21b7e749.png + (domain === "s3.manualzz.com" && /\/store\/+data\//.test(src)) || // https://media.coindesk.com/uploads/2018/07/shutterstock_703755544-860x430.jpg (domain === "media.coindesk.com" && string_indexof(src, "/uploads/") >= 0)) { // http://store.pinseyun.com/uploads/2016/10/20161021222440-150x150.jpg @@ -117811,7 +117819,8 @@ var $$IMU_EXPORT$$; }; } - if (host_domain_nowww === "twitter.com") { + if (host_domain_nowww === "twitter.com" || + host_domain_nowww === "x.com") { return { gallery: function(el, nextprev) { var is_photo_a = function(el) { diff --git a/userscript.user.js b/userscript.user.js index 25e4d512..216860e7 100644 --- a/userscript.user.js +++ b/userscript.user.js @@ -27962,7 +27962,8 @@ var $$IMU_EXPORT$$; if (newsrc) return newsrc; } - if (domain_nowww === "twitter.com") { + if (domain_nowww === "twitter.com" || + domain_nowww === "x.com") { // https://github.com/qsniyg/maxurl/issues/243 // https://twitter.com/NoMansSky/status/1325458262800683009 var _query_twitter_webapi = function(url, cookies, cb) { @@ -28008,7 +28009,7 @@ var $$IMU_EXPORT$$; }; var query_twitter_webapi = function(url, cb) { if (options.get_cookies) { - options.get_cookies("https://www.twitter.com/", function(cookies) { + options.get_cookies("https://www.x.com/", function(cookies) { if (cookies) cookies = headers_list_to_dict(cookies); _query_twitter_webapi(url, cookies, cb); @@ -28074,7 +28075,7 @@ var $$IMU_EXPORT$$; if (users && tweet.id_str && tweet.user_id_str) { var username = users[tweet.user_id_str].screen_name; obj.extra.author_username = username; - obj.extra.page = "https://twitter.com/" + username + "/status/" + tweet.id_str; + obj.extra.page = "https://x.com/" + username + "/status/" + tweet.id_str; } if (tweet.full_text) { obj.extra.caption = tweet.full_text; @@ -28245,7 +28246,7 @@ var $$IMU_EXPORT$$; if (newsrc) return newsrc; } - if (host_domain_nowww === "twitter.com" && options.element) { + if ((host_domain_nowww === "twitter.com" || host_domain_nowww === "x.com") && options.element) { var tweet_link = common_functions["get_twitter_tweet_link"](options.element); page_nullobj = null; if (tweet_link) { @@ -30353,6 +30354,9 @@ var $$IMU_EXPORT$$; // thanks to James Joint on discord: // https://images.kerrangcdn.com/images/2023/05/NessaBarrett-JamieLeeTaete-2023-9.jpg?auto=compress&fit=max&w=640 domain === "images.kerrangcdn.com" || + // thanks to anonymous for reporting: + // https://cso.org/media/ls1fzrky/kelliohara_1500x1125_v2.jpg?anchor=center&mode=crop&width=1440&height=795&format=jpg&quality=85&rnd=132965911799130000 + (domain_nowww === "cso.org" && /\/media\//.test(src)) || // http://us.jimmychoo.com/dw/image/v2/AAWE_PRD/on/demandware.static/-/Sites-jch-master-product-catalog/default/dw70b1ebd2/images/rollover/LIZ100MPY_120004_MODEL.jpg?sw=245&sh=245&sm=fit // https://www.aritzia.com/on/demandware.static/-/Library-Sites-Aritzia_Shared/default/dw3a7fef87/seasonal/ss18/ss18-springsummercampaign/ss18-springsummercampaign-homepage/hptiles/tile-wilfred-lrg.jpg src.match(/\/demandware\.static\//) || @@ -31350,6 +31354,10 @@ var $$IMU_EXPORT$$; src = src.replace(/-[0-9]+x[0-9]+\.([^/]*(?:[?#].*)?)$/, ".$1"); } if ((domain === "store.pinseyun.com" && string_indexof(src, "/uploads/") >= 0) || + // thanks to anonymous for reporting: + // https://s3.manualzz.com/store/data/019683962_1-63c5f7e3eec5b6a39772d3cb21b7e749-360x466.png + // https://s3.manualzz.com/store/data/019683962_1-63c5f7e3eec5b6a39772d3cb21b7e749.png + (domain === "s3.manualzz.com" && /\/store\/+data\//.test(src)) || // https://media.coindesk.com/uploads/2018/07/shutterstock_703755544-860x430.jpg (domain === "media.coindesk.com" && string_indexof(src, "/uploads/") >= 0)) { // http://store.pinseyun.com/uploads/2016/10/20161021222440-150x150.jpg @@ -105631,7 +105639,8 @@ var $$IMU_EXPORT$$; } }; } - if (host_domain_nowww === "twitter.com") { + if (host_domain_nowww === "twitter.com" || + host_domain_nowww === "x.com") { return { gallery: function(el, nextprev) { var is_photo_a = function(el) {