From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#69132: [ELPA] Remove jQuery from elpa.gnu.org Date: Wed, 14 Feb 2024 18:05:47 -0500 Message-ID: References: <87jzn6g7ep.fsf@posteo.net> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14491"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 69132@debbugs.gnu.org To: Philip Kaludercic Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Feb 15 00:08:04 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1raOMG-0003ag-1A for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 15 Feb 2024 00:08:04 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1raOLy-00082I-If; Wed, 14 Feb 2024 18:07:46 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1raOLx-000828-2h for bug-gnu-emacs@gnu.org; Wed, 14 Feb 2024 18:07:45 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1raOLw-0001Y5-I4 for bug-gnu-emacs@gnu.org; Wed, 14 Feb 2024 18:07:44 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1raOME-00074l-Gv for bug-gnu-emacs@gnu.org; Wed, 14 Feb 2024 18:08:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 14 Feb 2024 23:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69132 X-GNU-PR-Package: emacs Original-Received: via spool by 69132-submit@debbugs.gnu.org id=B69132.170795206927178 (code B ref 69132); Wed, 14 Feb 2024 23:08:02 +0000 Original-Received: (at 69132) by debbugs.gnu.org; 14 Feb 2024 23:07:49 +0000 Original-Received: from localhost ([127.0.0.1]:53461 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1raOM1-00074I-6Y for submit@debbugs.gnu.org; Wed, 14 Feb 2024 18:07:49 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:63565) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1raOLx-000742-RJ for 69132@debbugs.gnu.org; Wed, 14 Feb 2024 18:07:47 -0500 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id B6379100129; Wed, 14 Feb 2024 18:07:21 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1707952040; bh=y2hScTBW+UhOWCh8ocLRetqYKe2khZwqZyVs7cEBQ/k=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=eZ39j1ER3wTrd47lMffP4ir9lEq174usFHwTLugbfKof17dbFGDdoxOsxqpOwFuJl z1Lh9FzOTmx0yG0WYOIzhV8uDBV4e0LGzczKxIh/SF+P0CR8fgbwMdd2lT+XuUasgA 3HZpv1NBnjOb324XkFb+yqdZ322JieEEGEBrXIEHKzao2PeVXE1KAqcxFr8yhg5CyH tLWXysEFtInY6ol1uq8VI0cWVODv3MSeOBf20fsqya5VTcygppeuO4bEkZtfS8Nhnc +fl6PCGvBKHQRR9NDZOy+ndFrMB9rf7e37tqoTKuJlIKGOKOusWCH2HmWY05AHX+AC NUvgvLJA3N6sg== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id BCF3610005D; Wed, 14 Feb 2024 18:07:20 -0500 (EST) Original-Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id A282112041B; Wed, 14 Feb 2024 18:07:20 -0500 (EST) In-Reply-To: <87jzn6g7ep.fsf@posteo.net> (Philip Kaludercic's message of "Wed, 14 Feb 2024 19:41:50 +0000") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:280032 Archived-At: > I was recently surprised to see that elpa.gnu.org uses a jQuery library, > where it really isn't necessary. Re-implementing the same functionality > can be done in a few more lines of plain Javascript, without the need > for any minified code. Tested with relatively recent versions of > Firefox and Chromium, so perhaps it would be nice if someone with an > older browser could check if I didn't make any bold assumptions.=20 Works for me, but I'm not using an "older browser" =F0=9F=99=81 > diff --git a/html/javascript/package-search.js b/html/javascript/package-= search.js > index 47134045eb..92f29703a3 100644 > --- a/html/javascript/package-search.js > +++ b/html/javascript/package-search.js > @@ -1,6 +1,35 @@ > -$(document).ready(function() { > - $('table').filterTable({ > - label: '', > - placeholder: 'Search packages...' > - }); > +window.addEventListener("load", function (event) { > + const table =3D document.getElementById("packages"); > + > + const search =3D document.createElement("input"); > + search.setAttribute("placeholder", "Search packages..."); > + search.setAttribute("type", "search"); [...] I know very little about Javascript, but I'm curious: can't we add the `input` element directly in the HTML file, and skip those first 4 lines or = so? > diff --git a/html/layout.css b/html/layout.css > index 4f5c50d393..434220f8c1 100644 > --- a/html/layout.css > +++ b/html/layout.css A rationale/description of this part of the change would be welcome. > From 73a9335634f54b71e9723047f327cf782cfb7244 Mon Sep 17 00:00:00 2001 > From: Philip Kaludercic > Date: Wed, 14 Feb 2024 20:37:37 +0100 > Subject: [PATCH] Update HTML generation for new filter implementation > > --- > elpa-admin.el | 27 +++++++++++---------------- > 1 file changed, 11 insertions(+), 16 deletions(-) Same here. Stefan