Skip to content

Commit

Permalink
feat: Export isPageSupported
Browse files Browse the repository at this point in the history
  • Loading branch information
Neet-Nestor committed Sep 14, 2024
1 parent f0e643a commit dcb421f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ const PAGE_TOOLS_MAP: Record<string, typeof Oveleaf.tools> = {
"www.overleaf.com": Oveleaf.tools,
};

export const isPageSupported = (url: string) => {
return Object.keys(PAGE_HANDLER_MAP).includes(url);
};

export const isCurrentPageSupported = () => {
return Object.keys(PAGE_HANDLER_MAP).includes(window.location.hostname);
};
Expand Down

0 comments on commit dcb421f

Please sign in to comment.