# HG changeset patch # User neko259 # Date 2015-03-09 17:40:08 # Node ID 0040ea34f489158ee70ea5cc06dc658d6098e661 # Parent 1cd13cc56b69caa8fc16521dcacad68d9c7a8cbb Don't run time conversion if Intl not available in browser. Also convert thread death time in archived threads 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