diff --git a/boards/static/js/main.js b/boards/static/js/main.js --- a/boards/static/js/main.js +++ b/boards/static/js/main.js @@ -23,14 +23,16 @@ for the JavaScript code in this page. */ -var LOCALE = window.navigator.language; -var FORMATTER = new Intl.DateTimeFormat( - LOCALE, - { - weekday: 'short', year: 'numeric', month: 'short', day: 'numeric', - hour: 'numeric', minute: '2-digit', second: '2-digit' - } -); +if (window.Intl) { + var LOCALE = window.navigator.language; + var FORMATTER = new Intl.DateTimeFormat( + LOCALE, + { + weekday: 'short', year: 'numeric', month: 'short', day: 'numeric', + hour: 'numeric', minute: '2-digit', second: '2-digit' + } + ); +} /** * An email is a hidden file to prevent spam bots from posting. It has to be @@ -53,6 +55,10 @@ function highlightCode(node) { * Translate timestamps to local ones for all