Skip to content

Commit b761c57

Browse files
committed
feat(acms): Updates toolbar message to indicate partial ACMS support
Updates the toolbar button to display a warning icon with the message "ACMS has partial support in this version" when visiting ACMS websites, providing clearer communication to users about the current state of ACMS functionality.
1 parent 74cc110 commit b761c57

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

src/utils/toolbar_button.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import {
1818
areTransactionReceiptsDisabled,
1919
getCourtFromUrl,
20+
isACMSWebsite,
2021
} from './url_and_cookie_helpers.js';
2122

2223
export function getTabById(tabId, cb) {
@@ -74,6 +75,12 @@ export function updateToolbarButton(tab) {
7475
19: 'assets/images/grey-19.png',
7576
38: 'assets/images/grey-38.png',
7677
});
78+
} else if (isACMSWebsite(tab.url)) {
79+
// ACMS website. Show warning.
80+
setTitleIcon('ACMS has partial support in this version', {
81+
'19': 'assets/images/warning-19.png',
82+
'38': 'assets/images/warning-38.png'
83+
});
7784
} else {
7885
// It's a valid PACER URL. Therefore either show the nice blue icon or
7986
// show the blue icon with a warning, if receipts are disabled.

src/utils/url_and_cookie_helpers.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ export function areTransactionReceiptsDisabled(cookie) {
33
return cookie && cookie.value.match(/receipt=N/);
44
}
55

6+
export function isACMSWebsite(url){
7+
// Checks if the given URL belongs to ACMS
8+
return url.toLowerCase().includes('azurewebsites.us');
9+
}
10+
611
export function getCourtFromUrl(url) {
712
// This function is used as a security check to ensure that no components of
813
// RECAP are being used outside of PACER/ECF/ACMS. Be sure tests pass

0 commit comments

Comments
 (0)