Last active
April 8, 2017 12:21
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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