Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(pacer): Enhance isLoginPage to accurately identify login pages #381

Merged
merged 2 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Changes:
- Adds a badge to the extension icon and a banner in the options menu([#379](https://github.com/freelawproject/recap-chrome/pull/379), [#380](https://github.com/freelawproject/recap-chrome/pull/380))

Fixes:
- None yet
- Enhance isLoginPage to accurately identify login pages([#373](https://github.com/freelawproject/recap/issues/373), [#381](https://github.com/freelawproject/recap-chrome/pull/381)).

For developers:
- Nothing yet
Expand Down
8 changes: 6 additions & 2 deletions src/pacer.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,12 @@ let PACER = {
},

// Returns true if the URL is for the login page
isLoginPage: function(url) {
return this.getCourtFromUrl(url) === 'login';
isLoginPage: function (url) {
isPacerLogin = this.getCourtFromUrl(url) === 'login' && url.includes('csologin/login.jsf');
// matches the URL for the login page to the Manage My Account interface in PACER. The url is:
// https://pacer.psc.uscourts.gov/pscof/login.xhtml
isManageAccountLogin = this.getCourtFromUrl(url) === 'psc' && url.includes('pscof/login.xhtml');
return isPacerLogin || isManageAccountLogin;
},

convertToCourtListenerCourt: function(pacer_court_id) {
Expand Down
Loading