My request is that someone modify the script to activate only on the first instance of visiting a website, and then to stop working until I move away from that site. So once I take the 30 second wait to go to Bastion the first time, I don't have to do any more Bastion waiting unless I navigate away to Bastion and then want to come back.
I am willing to pay in SCUE currency or barter for graphics or anything else I know how to do. Don't bother telling me how pathetic it is that I need a script like this - I already know I have a hopelessly addictive personality. And you people wonder why I never drink
The original script is:
Code: Select all
// Ed O'Loughlin 20100-02-18
// Released to the public domain.
//
// ==UserScript==
// @name Delay Timewaster Sites
// @namespace http://neataudio.com
// @description Make certain pages invisible for 30 seconds. Based on Gina Trapani's Invisibility Cloak & inspired by the ALT tag on http://xkcd.com/862/
// @version 1.0
// @include *facebook*
// @include *youtube*
// @include *xkcd*
// @include http://flickr.com/*
// @include http://*.flickr.com/*
// @include http://metafilter.com/*
// @include http://*.metafilter.com/*
// @include http://reader.*.com/
// @include http://*google.com/reader/*
// @include http://news.ycombinator.com/*
// @include *twitter*
// ==/UserScript==
//
var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = Object.prototype.hasOwnProperty;
(function () {
// EDIT THE NEXT LINE TO SET THE HOUR AFTER WHICH SITES SHOULD APPEAR
// HOURS IN MILITARY TIME, SO 15 = 3PM
var surf_time_after = 17;
// END EDIT
var oldBodyStyle;
var bodyElem;
var tstamp = new Date();
if (tstamp.getHours() < surf_time_after )
{
bodyElem = (document.getElementsByTagName("body")[0]);
oldBodyStyle = bodyElem.getAttribute('style');
bodyElem.setAttribute('style', 'display:none!important');
setTimeout(__bind(function(){bodyElem.setAttribute('style',oldBodyStyle)}, this),30000);
}
})();