diff options
| author | Benjamin Southall <applemansigloo@gmail.com> | 2017-09-03 23:00:37 +0900 |
|---|---|---|
| committer | Benjamin Southall <applemansigloo@gmail.com> | 2017-09-03 23:00:37 +0900 |
| commit | c9ffd19f85963f20d53ba4bad1d3e76972583ed9 (patch) | |
| tree | 13b100900f46bba4b6ad3db5c4a4b152f0f19ae1 /js/local-time.js | |
| parent | a21a5b86ec1fb243c655f8ff2d288427ba17e854 (diff) | |
Changes to local-time.js storage boolean checks
Diffstat (limited to 'js/local-time.js')
| -rw-r--r-- | js/local-time.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/js/local-time.js b/js/local-time.js index 1a05002b..a821579f 100644 --- a/js/local-time.js +++ b/js/local-time.js @@ -73,7 +73,7 @@ $(document).ready(function(){ times[i].setAttribute('data-local', 'true'); - if (localStorage.show_relative_time === 'false') { + if (!localStorage.show_relative_time || localStorage.show_relative_time === 'false') { times[i].innerHTML = dateformat(iso8601(t)); times[i].setAttribute('title', timeDifference(currentTime, postTime.getTime())); } else { @@ -89,7 +89,7 @@ $(document).ready(function(){ Options.extend_tab('general', '<label id="show-relative-time"><input type="checkbox">' + _('Show relative time') + '</label>'); $('#show-relative-time>input').on('change', function() { - if (localStorage.show_relative_time !== 'false') { + if (localStorage.show_relative_time === 'true') { localStorage.show_relative_time = 'false'; clearInterval(interval_id); } else { @@ -100,7 +100,7 @@ $(document).ready(function(){ do_localtime(document); }); - if (localStorage.show_relative_time !== 'false') { + if (localStorage.show_relative_time === 'true') { $('#show-relative-time>input').attr('checked','checked'); interval_id = setInterval(do_localtime, 30000, document); } |
