-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
specifying what qualifies as an external link for EDU theme (#652)
- Loading branch information
1 parent
848bde5
commit d1fbddc
Showing
3 changed files
with
47 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
export const isEduExternalLink = (url: string): boolean => { | ||
if ( | ||
url && | ||
(url.startsWith('/edu/') || | ||
url.startsWith('/edubeta/') || | ||
url.startsWith('https://www.jpl.nasa.gov/edu/') || | ||
url.startsWith('https://jpl.nasa.gov/edu/')) | ||
) { | ||
return false | ||
} | ||
return true | ||
} |