Skip to content

Instantly share code, notes, and snippets.

@71
Last active April 8, 2017 12:21
Show Gist options
  • Save 71/b00ab83c042082b5f43623ac1dbc13a0 to your computer and use it in GitHub Desktop.
Save 71/b00ab83c042082b5f43623ac1dbc13a0 to your computer and use it in GitHub Desktop.
Simple script that tells me "You've been on Facebook n minutes now, c'mon." when I spend too much time on Facebook.
// ==UserScript==
// @name Facebook watcher
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Makes sure you don't spend too much time on Facebook
// @author You
// @require http://coffeescript.org/v1/browser-compiler/coffee-script.js
// @match https://www.facebook.com/*
// ==/UserScript==
// jshint evil:true
eval(CoffeeScript.compile(`
secs = 0
setInterval ->
secs++
if secs % 60 is 0
alert "You've been on Facebook #{secs / 60} minute#{if secs is 60 then '' else 's'} now, c'mon."
, 1000
`));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment