Skip to content

Commit

Permalink
feat(district): Tweak attachment page logic to get PACER case ID from…
Browse files Browse the repository at this point in the history
… DSL

- Adds logic to the handleAttachmentMenuPage method to extract the pacer_case_id from the GoDLS function in cases where it's not directly available in the page's DOM.
- Improves the reliability of PACER case ID retrieval on attachment pages.
  • Loading branch information
ERosendo committed Sep 19, 2024
1 parent 00c86c9 commit 22f2aaf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Changes:

Fixes:
- Corrected typo in build script, ensuring correct favicon path for Firefox releases([379](https://github.com/freelawproject/recap/issues/379), [397](https://github.com/freelawproject/recap-chrome/pull/397))
- Improves the reliability of PACER case ID retrieval on attachment pages ([369](https://github.com/freelawproject/recap/issues/369))

For developers:
- Nothing yet
Expand Down
9 changes: 9 additions & 0 deletions src/content_delegate.js
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,15 @@ ContentDelegate.prototype.handleAttachmentMenuPage = async function () {
return;
}

if (!this.pacer_case_id)
this.pacer_case_id = await getPacerCaseIdFromPacerDocId(
this.tabId,
this.pacer_doc_id
);

// If we don't have this.pacer_case_id at this point, punt.
if (!this.pacer_case_id) return;

const upload = await dispatchBackgroundFetch({
action: 'upload',
data: {
Expand Down

0 comments on commit 22f2aaf

Please sign in to comment.