From mboxrd@z Thu Jan 1 00:00:00 1970 From: andy at warmcat.com (Andy Green) Date: Mon, 25 Jun 2018 08:15:14 +0800 Subject: [PATCH] cgit.css: add dynamic age update In-Reply-To: <20180625005806.4585133e@leda> References: <152982719141.10974.13155108541444051299.stgit@mail.warmcat.com> <20180624115253.GM6584@john.keeping.me.uk> <20180625005806.4585133e@leda> Message-ID: <2A606D35-12EF-4714-ACE2-760D5A443E8A@warmcat.com> On June 25, 2018 6:58:06 AM GMT+08:00, Christian Hesse wrote: >John Keeping on Sun, 2018/06/24 12:52: >> I'd really like to here other people's opinions on this. > >I like this change, but we should keep js optional and not break >existing >functionality without it. (I did not look at the code, but discussion >sounds >like it is good as-is.) Yes, the only change to the C is one line that adds the unix time like ut=1234567 as an attribute in the span containing the age, because no nice reliable way to eat the formatted datetime already there in the tooltip. If no JS (sending that can be manually disabled by "js=" in the global conf, per John's suggestion), or it's disabled in browser, the server-generated age is shown static as today. Same goes for the line range highlight, it devolves to what is there today, no highlights and no ranges, no clipboard, but you can scrape from the URL bar, and relies on browser native logic to scroll to the id after the # one time. I think generally there can't be feature parity without JS, eg the line range stuff can only be done client-side. But the new JS features should always cleanly disappear if no JS, with features no worse than today, or it's a bug. -Andy