mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 23:13:25 +00:00
hash_parser: Add utility function to dynamically detect hash.
Added new utility function to hash_parser to dynamically detect the hash category of an URL. This is intended to reduce the need of adding more adhoc hash_parser utility functions.
This commit is contained in:
@@ -111,6 +111,11 @@ export function is_subscribers_section_opened_for_stream(): boolean {
|
||||
return hash_components[3] === "subscribers";
|
||||
}
|
||||
|
||||
export function is_in_specified_hash_category(hash_categories: string[]): boolean {
|
||||
const main_hash = get_hash_category(window.location.hash);
|
||||
return hash_categories.includes(main_hash);
|
||||
}
|
||||
|
||||
export const allowed_web_public_narrows = [
|
||||
"channels",
|
||||
"channel",
|
||||
|
||||
Reference in New Issue
Block a user