Skip to content

Commit

Permalink
feat(toolbar): Show warning sign in ACMS websites
Browse files Browse the repository at this point in the history
  • Loading branch information
mlissner authored and ERosendo committed Sep 27, 2023
2 parents 034e5d5 + 143d5fd commit ce47e96
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,19 @@
"*://ca11-showdoc.azurewebsites.us/",
"*://cafc-showdoc.azurewebsites.us/",
"*://cadc-showdoc.azurewebsites.us/",
"*://ca1-showdocservices.azurewebsites.us/",
"*://ca2-showdocservices.azurewebsites.us/",
"*://ca3-showdocservices.azurewebsites.us/",
"*://ca4-showdocservices.azurewebsites.us/",
"*://ca5-showdocservices.azurewebsites.us/",
"*://ca6-showdocservices.azurewebsites.us/",
"*://ca7-showdocservices.azurewebsites.us/",
"*://ca8-showdocservices.azurewebsites.us/",
"*://ca9-showdocservices.azurewebsites.us/",
"*://ca10-showdocservices.azurewebsites.us/",
"*://ca11-showdocservices.azurewebsites.us/",
"*://cafc-showdocservices.azurewebsites.us/",
"*://cadc-showdocservices.azurewebsites.us/",
"*://ca1-portal.powerappsportals.us/",
"*://ca2-portal.powerappsportals.us/",
"*://ca3-portal.powerappsportals.us/",
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

0 comments on commit ce47e96

Please sign in to comment.