Skip to content

Commit

Permalink
Fix "unreachable code after return statement" warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
qsniyg committed Jan 1, 2025
1 parent 1738257 commit 460b4a1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
11 changes: 7 additions & 4 deletions src/userscript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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) {
Expand Down
11 changes: 7 additions & 4 deletions userscript.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 460b4a1

Please sign in to comment.