From 4417345add493ee5a9bd4e45f50c7bde6155b6ce Mon Sep 17 00:00:00 2001 From: Eduardo Rosendo Date: Tue, 16 Jul 2024 17:27:14 -0400 Subject: [PATCH 1/2] feat(pacer): Enhance isLoginPage to accurately identify login pages This commit refines the isLoginPage helper function to correctly detect both the standard and manage account login pages. It achieves this by employing a more specific URL path-based approach. --- src/pacer.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/pacer.js b/src/pacer.js index 7feba2ad..6eb9aedc 100644 --- a/src/pacer.js +++ b/src/pacer.js @@ -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) { From fd61b5bebf9fd5a9cddd14419d554af92c2d5a30 Mon Sep 17 00:00:00 2001 From: Eduardo Rosendo Date: Tue, 16 Jul 2024 17:53:42 -0400 Subject: [PATCH 2/2] feat(docs): Updates the changes.md file --- CHANGES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 4a1f32ae..57a536dc 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -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