Skip to content

Commit

Permalink
feat(district): Add a method to insert warning in district courts
Browse files Browse the repository at this point in the history
  • Loading branch information
ERosendo committed Jul 20, 2023
1 parent 4108509 commit 3acd79e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ async function addRecapInformation(msg) {
// creates a <form> element and calls submit() on it, so we hook into submit().
content_delegate.handleSingleDocumentPageView();

// If this page offers a combined document, inserts a warning to let the user
// know this document is not supported.
content_delegate.handleCombinedPDFView();

// If this is a Clams Register, we upload it to RECAP
content_delegate.handleClaimsPageView();

Expand Down
12 changes: 12 additions & 0 deletions src/content_delegate.js
Original file line number Diff line number Diff line change
Expand Up @@ -682,6 +682,18 @@ ContentDelegate.prototype.handleZipFilePageView = function () {
window.addEventListener('message', this.onDownloadAllSubmit.bind(this));
};

// If the page offers a combined document, inserts a warning to let
// the user know this document won't be uploaded.
ContentDelegate.prototype.handleCombinedPDFView = function () {
if (!PACER.isCombinedPdfPage(this.url, document)) {
return false;
}
// query the main div of the page
let mainDiv = document.getElementById(id='cmecfMainContent')
pdfWarning = combinedPdfWarning()
mainDiv.append(pdfWarning)
};

ContentDelegate.prototype.handleClaimsPageView = function () {
// return if not a claims register page
if (!PACER.isClaimsRegisterPage(this.url, document)) {
Expand Down

0 comments on commit 3acd79e

Please sign in to comment.