From 2bad728b68018a58741dcd5f5a9a741dd7cb9766 Mon Sep 17 00:00:00 2001 From: Bram van der Veen <96aa48@gmail.com> Date: Thu, 13 Aug 2015 22:15:44 +0200 Subject: [PATCH] Added a function for detecting if the site is within a certain timespan --- time.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/time.js b/time.js index a27df6d..afb4d2e 100644 --- a/time.js +++ b/time.js @@ -21,7 +21,8 @@ function parse(timestr) { //Function for parsing and checking if the currrent time is within the parsed string. function within_timespan(timespan) { - + if (get() > parse(timespan)[0] && get() < parse(timespan)[1]) return true; + else return false; } function during_school() {