QOAL / localisetime

A web extension for localising times found in web pages
GNU General Public License v3.0
14 stars 0 forks source link

Add option to show converted time in tooltip only #27

Closed iTob191 closed 1 year ago

iTob191 commented 1 year ago

It would be great if there was an option to leave the website's text unaltered (except for the necessary changes to show the tooltip of course) and show the converted time only in the tooltip.

QOAL commented 1 year ago

Hello,

This is a reasonable request, and it's actually fairly trivial to implement. But I'd like your opinion on part of the functionality before I finish adding this.

Sometimes when a time is found, or updated, the safest way of localising it is to update the text only, no fancy container or tooltip. image This image shows the difference between the two.

For text only times, would you agree that they should always be localised, even if that goes against how other times are displayed? (There's no safe way of adding functionality to these times without potentially breaking the page's structure.)

(Also, for fully featured localised times, you can click on a time to toggle it between localised and the original text.)

iTob191 commented 1 year ago

The main reason why I want this feature is "safety". For example the text 2023-09-12 9:00 pm ET is converted to 2023-09-12 🕒03:00 (my time zone is CEST). The time conversion itself is correct, but the resulting date time is one day off. This specific case could probably be fixed, but no matter how sophisticated the algorithm becomes, it'll never catch all cases. With the proposed option, I will always see the original (date) time first and can then figure out the localized date with the help of the tooltip and my rudimentary geographical knowledge.

For text only times, would you agree that they should always be localised, even if that goes against how other times are displayed?

Because of the reasoning above, I would prefer the time to be unchanged in this case. If needed, I can still use the "sandbox" feature of the addon with minimal overhead.

/e: Btw, thanks for the great addon and fast reply!

QOAL commented 1 year ago

Yeah, the whole date/time thing is the very daunting elephant in the room. I appreciate your reasoning. You could also pause the extension on specific pages if that helps.

I wonder if it would be best to simply skip processing the plain text times instead, so it wouldn't show a clock emoji either. That would leave the text in a clearly unedited state, and since the option for this would have to be set by a user it would be a change in functionality that they could trace back to that toggle.

iTob191 commented 1 year ago

Thanks a lot!