From 460b4a1e6f25f22f46c4f66b422a8d9baa0389dc Mon Sep 17 00:00:00 2001 From: qsniyg Date: Wed, 1 Jan 2025 00:05:27 +0000 Subject: [PATCH] Fix "unreachable code after return statement" warnings --- src/userscript.ts | 11 +++++++---- userscript.user.js | 11 +++++++---- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/src/userscript.ts b/src/userscript.ts index 5cbfef80..b9abd148 100644 --- a/src/userscript.ts +++ b/src/userscript.ts @@ -22974,7 +22974,9 @@ var $$IMU_EXPORT$$; }; var app_api_call = function (url, cb) { - return web_api_call(url, cb); // FIXME: for testing only + if (true) { + return web_api_call(url, cb); // FIXME: for testing only + } if (!do_request) { return cb(null); @@ -23105,7 +23107,8 @@ var $$IMU_EXPORT$$; }; var get_all_stories_api = function(uid, cb) { - return get_all_stories_webapi(uid, cb); + if (true) + return get_all_stories_webapi(uid, cb); if (!use_app_api) return cb(null); @@ -23884,10 +23887,10 @@ var $$IMU_EXPORT$$; // the PostPage result differs quite significantly from the ProfilePage result return; - var shortcode = get_shortcode(edge); + /*var shortcode = get_shortcode(edge); if (shortcode) { api_cache.set("graphql_ig_post:" + shortcode, edge); - } + }*/ }; var fill_graphql_cache_with_postpage = function(postpage_text) { diff --git a/userscript.user.js b/userscript.user.js index 5ecf4b18..5a321b6e 100644 --- a/userscript.user.js +++ b/userscript.user.js @@ -21362,7 +21362,9 @@ var $$IMU_EXPORT$$; } }; var app_api_call = function(url, cb) { - return web_api_call(url, cb); // FIXME: for testing only + if (true) { + return web_api_call(url, cb); // FIXME: for testing only + } if (!do_request) { return cb(null); } @@ -21472,7 +21474,8 @@ var $$IMU_EXPORT$$; }); }; var get_all_stories_api = function(uid, cb) { - return get_all_stories_webapi(uid, cb); + if (true) + return get_all_stories_webapi(uid, cb); if (!use_app_api) return cb(null); var story_cache_key = "instagram_story_uid:" + uid; @@ -22111,10 +22114,10 @@ var $$IMU_EXPORT$$; // disable cache for now // the PostPage result differs quite significantly from the ProfilePage result return; - var shortcode = get_shortcode(edge); + /*var shortcode = get_shortcode(edge); if (shortcode) { api_cache.set("graphql_ig_post:" + shortcode, edge); - } + }*/ }; var fill_graphql_cache_with_postpage = function(postpage_text) { if (!host_is_ig || true) // June 30 2022: This doesn't work due to _sharedData not existing