選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

polyfills.js 598B

1234567891011121314151617
  1. try {
  2. // some browsers like PaleMoon don't have full support for Intl.NumberFormat, so do the minimum polyfill to support "relative-time-element"
  3. // https://repo.palemoon.org/MoonchildProductions/UXP/issues/2289
  4. new Intl.NumberFormat('en', {style: 'unit', unit: 'minute'}).format(1);
  5. } catch {
  6. const intlNumberFormat = Intl.NumberFormat;
  7. Intl.NumberFormat = function(locales, options) {
  8. if (options.style === 'unit') {
  9. return {
  10. format(value) {
  11. return ` ${value} ${options.unit}`;
  12. },
  13. };
  14. }
  15. return intlNumberFormat(locales, options);
  16. };
  17. }