Using javascript, I want to force a browser window to close after
about 30 minutes of non-use. Can someone point me to a script that can
do this?
I assume I could use the setTimeout function and keep re-setting it
whenever the mouse is moved.
Is there a better way?
|
|
0
|
|
|
|
Reply
|
Martin
|
3/7/2006 7:52:53 PM |
|
Martin wrote:
> Using javascript, I want to force a browser window to close after
> about 30 minutes of non-use. Can someone point me to a script that
> can do this?
Write it yourself.
> I assume I could use the setTimeout function and keep re-setting it
> whenever the mouse is moved.
Your assumption is correct.
> Is there a better way?
No.
PointedEars
|
|
0
|
|
|
|
Reply
|
Thomas
|
3/7/2006 8:05:49 PM
|
|
Thomas 'PointedEars' Lahn wrote:
> Martin wrote:
>>Using javascript, I want to force a browser window to close after
>>about 30 minutes of non-use. Can someone point me to a script that
>>can do this?
>
> Write it yourself.
\o/
(function(){
var timer;
(document.onmousemove = document.onkeydown = function(){
clearTimeout(timer), timer = setTimeout("window.close();", 1800000);
})();
})();
--
Jonas Raoni Soares Silva
http://www.jsfromhell.com
|
|
0
|
|
|
|
Reply
|
Jonas
|
3/7/2006 8:44:42 PM
|
|
On Tue, 07 Mar 2006 17:44:42 -0300, Jonas Raoni <jonasraoni@gmail.com>
wrote:
>Thomas 'PointedEars' Lahn wrote:
>> Martin wrote:
>>>Using javascript, I want to force a browser window to close after
>>>about 30 minutes of non-use. Can someone point me to a script that
>>>can do this?
>>
>> Write it yourself.
>
>\o/
>
>(function(){
> var timer;
> (document.onmousemove = document.onkeydown = function(){
> clearTimeout(timer), timer = setTimeout("window.close();", 1800000);
> })();
>})();
Thank you, Jonas. It's good to see that some people, like you, are
here to actually help others.
|
|
0
|
|
|
|
Reply
|
Martin
|
3/8/2006 1:51:54 AM
|
|
Martin wrote:
> On Tue, 07 Mar 2006 17:44:42 -0300, Jonas Raoni <jonasraoni@gmail.com>
> wrote:
> Thank you, Jonas. It's good to see that some people, like you, are
> here to actually help others.
Hmmm, not at all, I'm here just to spend some free time, discuss and
expose my opinion about unuseful things, but I really try to help
sometimes, anyway thanks :]
I want to discuss with Mr. Spock again, maybe I can beat my off-topic
record of 100 msgs, but he is thousands stronger than me ='/
--
Now with alcohol <URL:http://youtube.com/watch?v=lnQTZxqxc10> =X
Jonas Raoni Soares Silva
http://www.jsfromhell.com
|
|
0
|
|
|
|
Reply
|
Jonas
|
3/8/2006 2:49:46 AM
|
|
Jonas Raoni said the following on 3/7/2006 9:49 PM:
> Martin wrote:
>> On Tue, 07 Mar 2006 17:44:42 -0300, Jonas Raoni <jonasraoni@gmail.com>
>> wrote:
>> Thank you, Jonas. It's good to see that some people, like you, are
>> here to actually help others.
>
> Hmmm, not at all, I'm here just to spend some free time, discuss and
> expose my opinion about unuseful things, but I really try to help
> sometimes, anyway thanks :]
>
> I want to discuss with Mr. Spock again, maybe I can beat my off-topic
> record of 100 msgs, but he is thousands stronger than me ='/
LOL, we can do that if you want :)
--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
|
|
0
|
|
|
|
Reply
|
Randy
|
3/8/2006 4:22:57 AM
|
|
Randy Webb wrote:
> Jonas Raoni said the following on 3/7/2006 9:49 PM:
>> I want to discuss with Mr. Spock again, maybe I can beat my off-topic
>> record of 100 msgs, but he is thousands stronger than me ='/
>
> LOL, we can do that if you want :)
Not today, my aunt just died of a heart attack, I'll spend the rest of
my free time with my mom now =(
--
Now with alcohol <URL:http://youtube.com/watch?v=lnQTZxqxc10> =X
Jonas Raoni Soares Silva
http://www.jsfromhell.com
|
|
0
|
|
|
|
Reply
|
Jonas
|
3/8/2006 4:54:15 AM
|
|
|
6 Replies
398 Views
(page loaded in 0.063 seconds)
|