Redditblock

Redirects people back to what they were doing before they decided to browse Reddit from 7 AM to 5 PM inclusive.

目前为 2015-11-21 提交的版本。查看 最新版本

// ==UserScript==
// @name Redditblock
// @description Redirects people back to what they were doing before they decided to browse Reddit from 7 AM to 5 PM inclusive.
// @include https://*.reddit.com
// @include https://*.reddit.com/*
// @run-at document-start
// @version 0.0.1.20151121235450
// @namespace https://greasyfork.org/users/12417
// ==/UserScript==

// For any further inquiries, please contact me at scratch.mit.edu/users/iamunknown2 or reddit/u/iamunknowntwo
var date1 = new Date();
var hours = date1.getHours();
var day = date1.getDay();


if (hours >= 6 && hours <= 16 && day != 0 && day != 6) // If hours are 7 AM to 5 PM (inclusive) and not a weekend
{
    window.history.back(); // Get back to your work.
}