10

In the morning, I always start my day by opening up Chrome and checking my email, but somehow I always forget to clock in in our web based timeclock.

I don't use any desktop calendar solutions and I'd prefer not to, so a calendar reminder is out.

Rather, I'd like to have my homepage be the web based timeclock page, but only during the first couple hours of the day. Is there anything out there (like a Chrome plugin) that can help me accomplish this?

  • 3
    You could code a basic redirection page and make it your homepage. – VicAche May 1 '14 at 17:31
  • @VicAche: Good idea, feel free to make this an answer. – Nicolas Raoul May 2 '14 at 5:44
  • @VicAche This is what I ended up using, so post it as an answer and I'll gladly accept it! :) – Moses May 2 '14 at 16:34
7

If you are confident with coding/copy pasting, you could make a local home.html file that, using some javascript, redirects you to wherever you wanna be redirected.
Below is an example script that you could use after making necessary adjustments (I found this version here: Redirect Based on Time of Day)
It shouldn't be hard to make it an auto redirection if you prefer that.

<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!--
function ampmRedirect(dayURL, nightURL)
{
var currentTime;
var currentHour;

// get the current date and time
currentTime = new Date();

// returns the hour in military time
currentHour = currentTime.getHours();
// check if the hour is between 6pm and 6am
if ((currentHour < 6) || (currentHour > 17)) {
window.location = nightURL;
} else {
window.location = dayURL;
}
}
// -->
</SCRIPT>
</HEAD>
<BODY>
<FORM>
Click here to go to the next page:<BR>
<INPUT TYPE="button" VALUE="Next"
onClick="ampmRedirect('day.htm','night.htm')">
</FORM>
</BODY>
</HTML> 
2

If you're using Linux (Ubuntu) with Google Chrome (not Chromium) you can try this (not always working as it should because sometimes adds a new homepage):

cd ~/.config/google-chrome/Default && cat ./Preferences | jq '.session.startup_urls[]="http://myhomepage"' > Pref && mv ./Pref ./Preferences

You'll have to install:

sudo apt-get install jq gnome-schedule

Then open gnome-schedule and create recurrent tasks with that command for every homepage you want.

  • 1
    Wouldn't that work only when launching chrome, rather than each time you see your homepage? – VicAche May 1 '14 at 19:18
  • @VicAche yes it only works if when you launch Chrome – Cornelius May 1 '14 at 19:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.