courtlistener-download icon indicating copy to clipboard operation
courtlistener-download copied to clipboard

Extension is injecting "Download all PDFs from CourtListener" into CourtListener

Open mlissner opened this issue 11 months ago • 6 comments

Heya!

I'm using a new alert tool on CourtListener1 to monitor when the term "CourtListener" appears in CourtListener itself. Today I got an alert that the phrase "Download all PDFs from CourtListener" appeared on CourtListener.

The cause is familiar. An extension (this one) modified the contents of PACER HTML before it was sent to our servers. I.e., this is getting uploaded to CourtListener...

image

...and when we parse the HTML, we grab your text to add to our system.

I'm honestly not sure the best fix. A few options:

  1. Block uploads that have been modified by this extension.

    People used to have extensions that changed Trump to Drumpf, and we had to block those. This is the nuclear option. We can do better, I think.

  2. Alter our parsers to notice and ignore your button.

    Could work, but might take a bit of work to figure out our parsers. I think our parsers are pretty greedy about grabbing text inside fields because courts will use HTML to add color to fields.

  3. Alter the way this extension injects the button into PACER so that we don't catch it as part of the Nature of Suit field in the first place.

    Maybe it goes in the "RECAP Actions" drop down? I like the way this provides a way this extension and others to extend RECAP. Kind of fun. Hides your functionality though.

  4. Similarly: We could just add your button into RECAP itself and into CourtListener too, I suppose.

    Adding your functionality to RECAP itself would be easy and non-controversial, I think. The website is probably harder to do, since it'd take server-side work. I think we're less enthusiastic about adding JS dependencies to CourtListener itself.

  5. We send you a callback (or something).

    Another approach is that after we've grabbed our HTML for uploading, we send a callback or signal or whatever. You listen to that, and then you do your modifications after. This almost seems elegant, but I don't know how inter-extension communication works (if at all).

And there are probably other options too, so please let me know if you have thoughts for other ways to proceed that might fit better into your plans for your extension.

Our worst case is that we have to hack around the button on our side somehow. If it comes to that, we'll make a choice between the nuclear option (it's easy and we have code for it!) and improving our parsers (probably harder but certainly better for the community).

But I strongly suspect we'll find a nice collaborative solution. I'm optimistic. :)


1 Let me know if you want to join the beta. It's cool, but we'll probably wind up requiring a membership for it eventually.

mlissner avatar Dec 22 '24 18:12 mlissner

I'm going to create this alert and see what else comes up:

image

(So far, just the one example, and I already fixed it, but this will let me know how often this is happening.)

mlissner avatar Dec 22 '24 18:12 mlissner

Definitely on board to find a good solution so this isn't getting in your way, and willing to go with pretty much any of your suggestions (though 1 and 2 seem avoidable). Personally I think #4 is the best option: the lack of such a button in the native interface was why I created this extension, but using JavaScript to do bulk downloads is far from ideal. That said, I understand that's more work on your end, and you probably have a better sense than I do of how much demand there would be for such a feature.

Regarding option 5, it does look like this is possible: https://developer.chrome.com/docs/extensions/develop/concepts/messaging#external

Very excited that you're working on alerts for searches, it's a feature I've been wanting for a while! I'd love to join the beta, and I'm already a member so that's no barrier.

molly avatar Dec 22 '24 19:12 molly

I like option 5 as an architecture. That'll let you build more features in the future, which is nice.

I like option 4 because it adds a nice feature to RECAP, but it hides the feature, which isn't great.

I don't like option 4 for CL itself because it seems complicated there. Outside of this extension, it's not a feature request we've ever gotten. Weirdly?


So maybe let's aim for option five as our plan. I'll discuss with the devs on our side that work on RECAP and see if they have other ideas too, but if it works for you, it feels tidy and easy to me.

You've now got alerts for RECAP. Welcome to the beta. Look for the bell icon in the query bar! It still has bugs and isn't reliable yet, but we're very happy to have feedback.

mlissner avatar Dec 22 '24 19:12 mlissner

Sounds like a plan! Thanks for adding me!

molly avatar Dec 22 '24 19:12 molly

Question for you, Molly: We can easily just tweak our parsers or we can do the harder thing and send you a signal that you'd have to do work to receive and act upon.

I think one big variable is whether you'll be adding more features in the future. If so, I think we should do it right. If not, then it's more of a toss-up. What do you think?

mlissner avatar Dec 23 '24 18:12 mlissner

I’m not expecting to add to the extension, no.

molly avatar Dec 25 '24 17:12 molly