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(toolbar): Show warning sign in ACMS websites #346

Merged
merged 2 commits into from
Sep 27, 2023
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 @@ -5,7 +5,7 @@
The following changes are not yet released, but are code complete:

Features:
- None yet
- Adds a warning sign to the toolbar icon when users are on a ACMS website([#346](https://github.com/freelawproject/recap-chrome/pull/346))

Changes:
- Adds permissions to access ACMS URLs. ACMS is the new CM/ECF replacement
Expand Down
4 changes: 4 additions & 0 deletions src/pacer.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ let PACER = {
return null;
},

isACMSWebsite: function(url){
return url.toLowerCase().includes('azurewebsites.us');
},

// Returns true if the URL is for the login page
isLoginPage: function(url) {
return this.getCourtFromUrl(url) === 'login';
Expand Down
6 changes: 6 additions & 0 deletions src/toolbar_button.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ function updateToolbarButton(tab) {
'19': 'assets/images/grey-19.png',
'38': 'assets/images/grey-38.png'
});
} else if (PACER.isACMSWebsite(tab.url)) {
// ACMS website. Show warning.
setTitleIcon('ACMS is not supported', {
'19': 'assets/images/warning-19.png',
'38': 'assets/images/warning-38.png'
});
} else {
// It's a valid PACER URL. Therefore either show the nice blue icon or
// show the blue icon with a warning, if receipts are disabled.
Expand Down