summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Southall <applemansigloo@gmail.com>2017-06-08 08:12:18 +0900
committerBenjamin Southall <applemansigloo@gmail.com>2017-06-08 08:12:18 +0900
commitda6eb9e2cb4eabf96c54b286b54a3426d618d382 (patch)
tree12c3f57b658f0e8d0128ea8cfe5df8aef1d22266
parent19e6658bc182403feb321a416471d19b92161441 (diff)
local-time.js changes from https://github.com/vichan-devel/vichan/commit/65f39b8a07adb70ac8ac7c82ba2d2dab927459c6 and https://github.com/vichan-devel/vichan/commit/c21eeff6057a50230b4ba3574ba19757995b3546
-rw-r--r--js/local-time.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/js/local-time.js b/js/local-time.js
index a821579f..1a05002b 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 || localStorage.show_relative_time === 'false') {
+ if (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 === 'true') {
+ if (localStorage.show_relative_time !== 'false') {
localStorage.show_relative_time = 'false';
clearInterval(interval_id);
} else {
@@ -100,7 +100,7 @@ $(document).ready(function(){
do_localtime(document);
});
- if (localStorage.show_relative_time === 'true') {
+ if (localStorage.show_relative_time !== 'false') {
$('#show-relative-time>input').attr('checked','checked');
interval_id = setInterval(do_localtime, 30000, document);
}