Skip to content

Commit

Permalink
Merge pull request #335 from ttys0dev/document-selection-menu
Browse files Browse the repository at this point in the history
Improve Document Selection Menu page matching
  • Loading branch information
mlissner authored Jul 10, 2023
2 parents e13a7fc + 913087f commit 372a927
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/pacer.js
Original file line number Diff line number Diff line change
Expand Up @@ -317,9 +317,11 @@ let PACER = {
let mainContent = document.getElementById("cmecfMainContent");
// End this function early if we're on a management PACER page
if (!mainContent){ return false }
let bottomNote = mainContent.lastChild.textContent.includes('view each document individually')
let paragraphs = mainContent.getElementsByTagName("p");
let topNote = paragraphs.length ? paragraphs[0].textContent.includes('Document Selection Menu') : false
let bottomNote = mainContent.lastChild.textContent.includes('view each document individually');
let pageCheck = PACER.isDocumentUrl(url) && (
!!buttonText || !!bigFile || !!bottomNote);
!!buttonText || !!bigFile || !!topNote || !!bottomNote);
return !!pageCheck;
},

Expand Down

0 comments on commit 372a927

Please sign in to comment.