From da6eb9e2cb4eabf96c54b286b54a3426d618d382 Mon Sep 17 00:00:00 2001 From: Benjamin Southall Date: Thu, 8 Jun 2017 08:12:18 +0900 Subject: [PATCH] local-time.js changes from https://github.com/vichan-devel/vichan/commit/65f39b8a07adb70ac8ac7c82ba2d2dab927459c6 and https://github.com/vichan-devel/vichan/commit/c21eeff6057a50230b4ba3574ba19757995b3546 --- js/local-time.js | 6 +++--- 1 file 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', ''); $('#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); }