Subject: Re: bug#69132: [ELPA] Remove jQuery from elpa.gnu.org

From: Corwin Brust <[email-masked]>
Date: Sat, 17 Feb 2024 22:07:56 -0600

On Sat, Feb 17, 2024 at 9:28 PM Richard Stallman <[email-masked]> wrote:
>
> [[[ To any NSA and FBI agents reading my email: please consider    ]]]
> [[[ whether defending the US Constitution against all enemies,     ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
>
> There is no special harm in using jquery.  It is free software,
> However, can we make elpa.gnu.org use NO Javascript?
> That would be better.
>

In essence: No, it's not possible.

Given someone thought they'd use it, we could add an additional option
(radio button, or smth) that would case the search to happen on the
server instead of via client-side script.   That said, there are
several reasons I feel it would be tragic to /replace/ a client side
function with a server side one, in this case.  Threeish paragraphs on
that and the fine one back to OPs point, I think.

Currently the websites for the ELPAs provide the ability to filter the
full package list that is displayed initially when (e.g.) this page
loads:

As stated: I think it is *not* possible to perform this type of
"client-side" search without using Javascript.  It would likely be
simple to create a search program on the web-server, however in this
case that actually makes it slightly harder for users to see the
search code involved (and way, way harder for them to change it, for
themselves).

The javascript must be sent to the user-agent to be evaluated, after
all.  In fact, this often means a user can, in addition to viewing and
saving the sources, use the javascript console and other so-called
"developer tools".  Developer tools are provided in some form by a
variety of popular browsers such as Firefox and the Chromium line,
among others.  Using these it is often possible to redefine functions
and such before (e.g.) pressing a search button.

At present, users who don't allow javascript execution must use the
browser's search-within-page functions then iterate the results, which
is just what I typically do when I'm looking for something with the
`list-packages' UI, so it should be familiar even to those not using
an in-emacs browser such as eww.

So, I think the status quo is fine, notwithstanding removing jquery.
In that regard, I think the argument was we don't use it enough
considering it's a fairly big javascript library to send to every user
that loads the page; given I've understood properly, I do agree.