Closed mdaniels5757 closed 1 year ago
Thanks Michael. This looks like a dup of #238. Your solution seems logical to me. Want to take a crack at PR?
As I said in #238, I don't think we should be looking for a heading at all.
We should just look for table rows of doc1 links and if they're there than they're close enough to attachment pages to be worth shipping to the server for it to parse. (Because don't have a unified parser in the client and server, and don't want to overparse in the client).
I think this analysis remains correct, 2 years later.
So, that is:
(document.querySelectorAll(`td a[href*="/doc1"], td a[href*="/docs1"]`).length > 0)
Or maybe without even the td
constraint?
I'm happy with either solution.
I believe this is fixed via https://github.com/freelawproject/recap-chrome/pull/269
I think this is my first bug filed here, apologies if I screwed this up.
Expected behavior w/ example:
Actual behavior on certain doc1 pages:
Suspected cause:
isAttachmentMenuPage
in pacer.js does not detect pages where there is no "Download All" button.Possible (untested!) solution:
isAttachmentMenuPage
, instead or as an alternative to checking for a "Download All" button, check the top bolded text on the doc1 page is "Document Selection Menu".document.getElementsByTagName('b')[0].textContent == 'Document Selection Menu'
Best, Michael Daniels