Extensions :  K-Meleon Web Browser Forum
All about K-Meleon extensions. 
Continuous Reload macro
Posted by: Zero3K
Date: March 19, 2015 03:01AM

I have a suggestion for it. It should have an option to do a hard refresh (thereby being able to reload a site even when its having trouble).

Options: ReplyQuote
Re: Continuous Reload macro
Posted by: George_Hall
Date: March 19, 2015 06:41AM

There is already "Continous Reload" for the K-Meleon Browser without a "Continous Reload" macro.

Right Click on the refresh button and click on "Continous Reload" works in K-Meleon without a "Continous Reload" macro

Right Click while the arrow pointer is hoverng above above a webpage, Next select Reloading on the "Conrext Menu" And then click "Continous Reload" also works in K-Meleon without a "Continous Reload" macro.



Edited 6 time(s). Last edit at 03/19/2015 11:09AM by George_Hall.

Options: ReplyQuote
Re: Continuous Reload macro
Posted by: Zero3K
Date: March 19, 2015 07:12AM

It uses a macro to do that. Its filename is reload.kmm in \macros. I'm just wanting to have a toggle for a normal/hard refresh added to it.



Edited 1 time(s). Last edit at 03/19/2015 07:13AM by Zero3K.

Options: ReplyQuote
Re: Continuous Reload macro
Posted by: George_Hall
Date: March 19, 2015 11:28AM

Quote
Zero3K
I have a suggestion for it. It should have an option to do a hard refresh (thereby being able to reload a site even when its having trouble).

I think "Force Reload" is a hard refresh

Becuase "Force Reload" can be performed just by pressing down the two keys CTRL+F5. A Toogle would be pointless for "Force Reload"



Edited 1 time(s). Last edit at 03/19/2015 11:45AM by George_Hall.

Options: ReplyQuote
Re: Continuous Reload macro
Posted by: Dorian
Date: March 19, 2015 07:17PM

It must be done without javascript. This is possible (with some limitations) but I need to fix some things first.

Options: ReplyQuote
Re: Continuous Reload macro
Posted by: Zero3K
Date: March 19, 2015 07:39PM

Quote
Dorian
It must be done without javascript. This is possible (with some limitations) but I need to fix some things first.

What limitations are there?

Options: ReplyQuote
Re: Continuous Reload macro
Posted by: Dorian
Date: March 20, 2015 05:50PM

Less than I thought at first.

Here a first implementation with the update I've just posted for RC75.

Reload2_Timer{
id(navReload);
}

Reload2_Start{
  $Reload2_duration = $ARG;
  if (5>$Reload2_duration)
  {
    $__pre=getpref(INT,$_Reload_Interval);
    $Reload2_duration=prompt(_("Enter number of seconds between reloads:"),_("Continuous Reload"),$__pre);
    setpref(INT,$_Reload_Interval,$Reload2_duration); 
  }
  if (4<$Reload2_duration) 
    settimer("Reload2_Timer", $Reload2_duration, "continuous");
  else
    alert("Interval can't be less than 5 seconds");
}

Reload2_Stop{
# Stop timers for the current tab
# This kill all timers, not just reload
  killtimer();
}

_Reload2_BuildMenu{
  $__r="Reloa&ding";
  setmenu($__r,macro,"&Hard Continuous Reload...",Reload2_Start);
  setmenu($__r,macro,"&Stop Continuous Reload",Reload2_Stop);
}

$OnInit=$OnInit."_Reload2_BuildMenu;";

But currently there is no timer indication.



Edited 1 time(s). Last edit at 03/20/2015 05:52PM by Dorian.

Options: ReplyQuote
Re: Continuous Reload macro
Posted by: siria
Date: March 20, 2015 06:35PM

New macro commands for 75, great! smiling smiley smiling smiley

Just wondering what exactly a "hard" reload means? Was assuming it meant force-reload (id navForceReload), but now unsure.

Options: ReplyQuote
Re: Continuous Reload macro
Posted by: Zero3K
Date: March 20, 2015 07:38PM

Where's the "new update" at?

Options: ReplyQuote
Re: Continuous Reload macro
Posted by: rodocop
Date: March 20, 2015 09:09PM

Quote
Zero3K
Where's the "new update" at?

update in main RC-thread

Options: ReplyQuote
Re: Continuous Reload macro
Posted by: Zero3K
Date: March 20, 2015 09:46PM

Quote
rodocop
Quote
Zero3K
Where's the "new update" at?

update in main RC-thread

Thanks.

Options: ReplyQuote
Re: Continuous Reload macro
Posted by: Zero3K
Date: March 21, 2015 02:37AM

Quote
Dorian
Less than I thought at first.

Here a first implementation with the update I've just posted for RC75.

Reload2_Timer{
id(navReload);
}

Reload2_Start{
  $Reload2_duration = $ARG;
  if (5>$Reload2_duration)
  {
    $__pre=getpref(INT,$_Reload_Interval);
    $Reload2_duration=prompt(_("Enter number of seconds between reloads:"),_("Continuous Reload"),$__pre);
    setpref(INT,$_Reload_Interval,$Reload2_duration); 
  }
  if (4<$Reload2_duration) 
    settimer("Reload2_Timer", $Reload2_duration, "continuous");
  else
    alert("Interval can't be less than 5 seconds");
}

Reload2_Stop{
# Stop timers for the current tab
# This kill all timers, not just reload
  killtimer();
}

_Reload2_BuildMenu{
  $__r="Reloa&ding";
  setmenu($__r,macro,"&Hard Continuous Reload...",Reload2_Start);
  setmenu($__r,macro,"&Stop Continuous Reload",Reload2_Stop);
}

$OnInit=$OnInit."_Reload2_BuildMenu;";

But currently there is no timer indication.

How would you go about implementing it?



Edited 1 time(s). Last edit at 03/21/2015 02:39AM by Zero3K.

Options: ReplyQuote
Re: Continuous Reload macro
Posted by: Dorian
Date: March 21, 2015 10:22AM

Put the attached file in your macros folder. It adds 2 new menu item in the reoload menu.


Quote
siria
New macro commands for 75, great! smiling smiley smiling smiley

Just wondering what exactly a "hard" reload means? Was assuming it meant force-reload (id navForceReload), but now unsure.

It means nothing. It's just how Zero3K named it, doing the reload with kmeleon and not with js.

Attachments: reload2.kmm (816 bytes)  
Options: ReplyQuote
Re: Continuous Reload macro
Posted by: Zero3K
Date: March 24, 2015 03:21PM

Quote
Dorian
Put the attached file in your macros folder. It adds 2 new menu item in the reoload menu.


Quote
siria
New macro commands for 75, great! smiling smiley smiling smiley

Just wondering what exactly a "hard" reload means? Was assuming it meant force-reload (id navForceReload), but now unsure.

It means nothing. It's just how Zero3K named it, doing the reload with kmeleon and not with js.

I think it has a bug in it because it stops working after being active for a while.

Options: ReplyQuote
Re: Continuous Reload macro
Posted by: Dorian
Date: March 24, 2015 05:58PM

Does it work again if you reactive it or you need to restart?

Options: ReplyQuote
Re: Continuous Reload macro
Posted by: Zero3K
Date: March 24, 2015 08:53PM

Quote
Dorian
Does it work again if you reactive it or you need to restart?

I usually just restart it when it stops working.



Edited 1 time(s). Last edit at 03/24/2015 08:53PM by Zero3K.

Options: ReplyQuote
Re: Continuous Reload macro
Posted by: Zero3K
Date: April 15, 2015 04:41PM

Quote
Zero3K
Quote
Dorian
Does it work again if you reactive it or you need to restart?

I usually just restart it when it stops working.

It turns out that it only works for the first 10 tabs it is applied to. The 11th, etc. ones aren't being affected by it.

Options: ReplyQuote
Re: Continuous Reload macro
Posted by: Dorian
Date: April 16, 2015 05:05PM

How many reloading tabs do you need usually?

Options: ReplyQuote
Re: Continuous Reload macro
Posted by: Zero3K
Date: April 16, 2015 06:13PM

Quote
Dorian
How many reloading tabs do you need usually?

Right now, 14 tabs. I think that there shouldn't be a max on the number of them.

Options: ReplyQuote
Re: Continuous Reload macro
Posted by: Zero3K
Date: April 19, 2015 04:44PM

Quote
Zero3K
Quote
Dorian
How many reloading tabs do you need usually?

Right now, 14 tabs. I think that there shouldn't be a max on the number of them.

Is it fixable or not?

Options: ReplyQuote
Re: Continuous Reload macro
Posted by: JamesD
Date: April 19, 2015 08:45PM

I can't speak for Dorian, but it likely is possible to fix. It might become a matter of the resources required. If ten is possible now, twenty should be also if one wants to commit twice as many counters, variables, etc. all the time.

It might be prudent to have a pref which could default to ten but allow the user to set to higher number. Setting to a higher number would commit the user's KM to need more resources.

Options: ReplyQuote
Re: Continuous Reload macro
Posted by: Dorian
Date: April 22, 2015 10:47PM

This will be fixed, but there will still be a limit, you don't want a buggy macro to be able to create ton of timers.

Options: ReplyQuote
Re: Continuous Reload macro
Posted by: Zero3K
Date: April 23, 2015 01:35AM

Quote
Dorian
This will be fixed, but there will still be a limit, you don't want a buggy macro to be able to create ton of timers.

Ok. That makes sense.

Options: ReplyQuote
Re: Continuous Reload macro
Posted by: Zero3K
Date: May 05, 2015 10:59PM

Quote
Zero3K
Quote
Dorian
This will be fixed, but there will still be a limit, you don't want a buggy macro to be able to create ton of timers.

Ok. That makes sense.

Has it been fixed yet?

Options: ReplyQuote


K-Meleon forum is powered by Phorum.