bug-librejs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Updating homepage to point people to pagure for development.


From: W. Kosior
Subject: Re: [PATCH] Updating homepage to point people to pagure for development.
Date: Tue, 7 Dec 2021 11:27:17 +0100

On Tue, 07 Dec 2021 20:47:35 +1100
Yuchen Pei <hi@ypei.me> wrote:

> On Fri, Dec 03 2021, W. Kosior wrote:
> > [...]
> > The "register" tab was hidden with CSS. I guess maybe EWW just shows
> > hidden elements? While NoScript is not expected to make fedora
> > accounts site work, "reveal hidden HTML" is  
> 
> You are right, I tried NoScript and it does not fix
> <https://accounts.fedoraproject.org>.
> 
> Do you know how LibreJS prevents register tab from being revealed when
> "Register" is clicked?
>

As always, the site depends on JS which is blocked.

More concretely, the "Register" and "Login" buttons (actually, <a>'s)
must be driven by some dynamically-registered javascript handlers for
their "onclick" events. Each handler, when run, hides one tab and
unhides the other. Since JS gets blocked, the handlers do not get
registered.

And this is what my fix does, it adds such javascript handlers. What's
interesting is that doing this takes ~16 lines while the site, if
allowed, would load 2 libraries.

It would also be possible to design such site to instead have handlers
registered via HTML attributes (which would break with LibreJS too) or
to have tabs show/hide using CSS and radio buttons tricks (which would
work with LibreJS)


Wojtek

-- 
website: https://koszko.org/koszko.html
PGP: https://koszko.org/key.gpg
fingerprint: E972 7060 E3C5 637C 8A4F  4B42 4BC5 221C 5A79 FD1A

Attachment: pgp821yWkdXqq.pgp
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]