Coder Social home page Coder Social logo

ncaq / goodbye-rfc-2822-date-time Goto Github PK

View Code? Open in Web Editor NEW
18.0 3.0 1.0 1.69 MB

I hate the date and time notation method like RFC 2822. This extension converts time notation to native language as much as possible.

License: MIT License

TypeScript 92.75% JavaScript 7.25%
firefox firefox-webextension browser-extension typescript datetime localization rfc-2822 chrome chrome-extension

goodbye-rfc-2822-date-time's Introduction

lint Mozilla Add-on Chrome Web Store

goodbye-rfc-2822-date-time

English

This project is a web browser extension that aims to convert date and time notations into a user-friendly form.

For example, the RFC 2822 format (e.g. Dec 22, 2018) is very easy to understand for people in the US.

However, for us Japanese, the notation is not always intuitive. I especially have a hard time remembering English month names (e.g. Oct), and I often wonder what month Oct was? octopus? I am not sure which month you are referring to.

By installing this extension, it is possible to convert the date and time notation to the natural notation of each user's native language, or change it to ISO 8601.

Specifically, if you are using GitHub in Japanese, notations such as 2018年12月23日 will be converted into a form that is easy for us Japanese to understand, such as Dec 23, 2018. In this way, the extension eliminates confusion about the notation of date and time.

Japanese

このプロジェクトはwebブラウザ向けの拡張機能で、日時の表記をユーザーにとって分かりやすい形に変換することを目指しています。

例えばRFC 2822形式の日時表記(Dec 22, 2018等)は、アメリカの人々には非常に理解しやすい形となっています。

しかし、私たち日本人にとってはその表記方法は必ずしも直感的ではありません。 特に私は英語の月名(例:Oct)を覚えるのが難しく、Octは何月だったっけ?タコ?など、どの月を指しているのか分からなくなります。

そこで、この拡張機能を導入することで、日時表記を各ユーザーの母国語による自然な表記に変換したり、ISO 8601に変更したりすることが可能になります。

具体的には、GitHubを日本語で利用している場合には、Dec 23, 2018といった表記が2018年12月23日というように、我々日本人にとって分かりやすい形に変換されます。 このように、拡張機能を利用することで日時の表記に関する混乱を解消します。

Support website(current)

Distribution

Use library mainly

Day.js

How to build and package(required by Mozilla)

yarn --frozen-lockfile
yarn package

goodbye-rfc-2822-date-time's People

Contributors

dependabot[bot] avatar ncaq avatar yuseisui avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

yuseisui

goodbye-rfc-2822-date-time's Issues

アイコンを変える

今のアイコンは単に月を翻訳するだけになっているので形式全体を翻訳するものに変更する

webpackに移行

Parcelはbabelを自動で有効化したり暗黙の動作が多すぎる

browserifyをやめる

サクッと作るだけで1ファイルだけだから良いやと思って使ってましたけど拡張性に乏しいし機能も少ないのでparcelあたりを試してみる

Manifest V3への対応

この拡張はbackground script一切なしの、
依存ライブラリのバンドルを除けば実はUserScriptだけでいける性質のものなので、
もしかしたらすぐ終わるかもしれません。

自動デプロイ

タグ付けするだけでCircleCIでFirefoxとChromeのストアに自動デプロイするようにする
GitHub Actionsのは自分のはソースコードを添付する必要があるので使えない

全てのサイトに対応するのではなく、ドメインを絞って対応する

などとは逆行する方向性なのですが、
やはり全てのサイトで動くアドオンというのはセキュリティ的に危ないし、
ユーザから見ても怪しい。
現状無意味に動くことが多いのでパフォーマンス的にも問題がある。
phpbbは特にいろんなサイトが独自にホスティングしているのでサポートしたいところですが、
少なくとも対応を始めるまではパーミッションを絞ったほうが良さそうである。

非対応のサイトではbodyの監視などをやめる

現在replaceDateで対応サイトを判定→書き換えを行っていて,
bodyが書き換えられるたびにreplaceDateを呼び出しているけど,
これは判定の無駄.

まず対応サイトを判定→対応していたらbodyを監視,
という方式をとったほうがCPUに優しい.

というか

  • 判定
  • 監視
  • 書き換え

の3つのロジックはそれぞれ分割して制御するべき.

momentのimport地獄をなんとかする

解決方法が全く分からない
side effectはexportでオブジェクトを伝達しないと起きないんだけど
momentのlocaleにはオブジェクトが全く無いのでexportするのも出来なかった

parcelで黒魔術を実装しないとダメか

GitHub: 時間経過系で相対時間が書き換えられた時にlang属性が消失する

issueに書き込んで少し待つと相対時間が更新されますが、その時にlang属性も消滅するらしく、設定が消えてしまいます。
observeの仕組みはあまりうまく働いていないようです。

observeを頑張るより、
github/relative-time-element: Web component extensions to the standard element.
で抜け道無いかもう一度見るべきな気がします。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.