General :  K-Meleon Web Browser Forum
General discussion about K-Meleon 
Pages: 12Next
Current Page: 1 of 2
Stop gif animation
Posted by: JohnHell
Date: January 01, 2004 03:10PM

Hello, I posted to the requests forum but viewing other features that you have easy implemented on KM i'm asking my self if it's possible to stop the gif animation AFTER the web is loaded such as press "ESC", adding some thing to the configs in the preferences of KM.

If not I will wait for that enhancement, but I think can be posible but haven't not much knowkledge to change it by myself yawning smiley)

Thanks for all smiling smiley

Note: I request this because I only have a 200Mhz MMX processor and sometimes gifs eats all my cpu time after a page is fully loaded and I _need_ to stop them as explained.

Options: ReplyQuote
Re: Stop gif animation
Posted by: efosb
Date: January 01, 2004 03:28PM

Have you tried going to "Edit" then "Preferences" then "Privacy" and un-check "Enable animated images"? I haven't tried it but it seems like it should work for the problem you seem to have. Hope it helps. :-)

Options: ReplyQuote
Re: Stop gif animation
Posted by: efosb
Date: January 01, 2004 03:31PM

i forgot to mention, and ask, why do you want to stop the animations AFTER the page has loaded? doing that would still use a lot of CPU. stopping them before the page loads sounds like a better idea unless there is a reason why you want to wait till after the page has loaded to stop them, lol. just curious here, lol

Options: ReplyQuote
Re: Stop gif animation
Posted by: Marc (@box.)
Date: January 01, 2004 05:07PM

I understand why he wants this feature. It works in IE, NS4 and Mozilla, but not in Firebird.

I like allowing a site to have animated gifs (I won't disable the option), but having the possibility to stop it can be useful on some sites: ugly/distracting, or simply overloaded (when you have animations everywhere. titles, bullets, lines, illustrations...).

>doing that would still use a lot of CPU

Not after the animation has been stopped. It's the point. winking smiley

Options: ReplyQuote
Re: Stop gif animation
Posted by: JohnHell
Date: January 01, 2004 05:32PM

Thanks for your comments Marc. That's exactly why I want this feature.

I don't want to stop all animations and I knew it is posible from the preferences of KM, but I only want it in sites as you describe.

>>doing that would still use a lot of CPU

>Not after the animation has been stopped. It's the point. winking smiley

Maybe he thought about flash >_< I hate flash arghh

And about:

>I understand why he wants this feature. It works in IE, NS4 and Mozilla, but not in Firebird.

Mozilla 1.4 (maybe, I can't remember) had the same problem, but for the 1.5 version they solved adding the possibility to stop gifs pressing "Esc" after all page was loaded. I guess that with Firebird had made the same mistake :-/

But stop talking about others browsers, I have found this one and I think is gonna to be the substitute of my "old" Netscape 4.8 ;P and that's why I request it :-D FI'm so happy with KM after 2-3 days of use :-D

Bye all.

Options: ReplyQuote
Re: Stop gif animation
Posted by: jsnj
Date: January 01, 2004 05:45PM

Have you guys tried any of these?

http://www.squarefree.com/bookmarklets/zap.html

Options: ReplyQuote
Re: Stop gif animation
Posted by: MonkeeSage
Date: January 01, 2004 05:52PM

How about a macro that sets the global pref, then reloads the page, then resets the pref?

Something like:
========

$loaded = "";

stop_gif {
setpref(STRING, "image.animation_mode", "none");
id(ID_NAV_RELOAD);
$loaded = "reset_gif";
}

reset_gif {
setpref(STRING, "image.animation_mode", "");
}

OnLoad {
$loaded != "" ? macros($loaded) : 0;
}


Not tested, just throwing out an idea...


Shelumi`El
Jordan

S.D.G

Options: ReplyQuote
Re: Stop gif animation
Posted by: MonkeeSage
Date: January 01, 2004 05:54PM

Oops...

reset_gif {
setpref(STRING, "image.animation_mode", "");
$loaded = "";
}

Options: ReplyQuote
Re: Stop gif animation
Posted by: Eyes-Only
Date: January 01, 2004 06:40PM

Tried jsnj? Yes, since you posted the link. Get them to import and work? Not to save my life! LOL! Some of those would've been very helpful for me too, like the zap of the white background and replacing it with tan for pages (like here) because of my migraines. Oh well... a lot of others though I wouldn't have had much use for since there are very few places I surf to. When surfing you guys get most of my time. ;oþ Lucky you, huh?

Eyes-Only
"L'Peau-Rouge"

Options: ReplyQuote
Re: Stop gif animation
Posted by: JohnHell
Date: January 01, 2004 07:19PM

Should we post this as a KM bug?

Mozilla Firstly:
http://bugzilla.mozilla.org/show_bug.cgi?id=70030
Firebird since november:
http://bugzilla.mozilla.org/show_bug.cgi?id=213377

I've tried yours MonkeeSage, but with errors... don't work for me and without ideas because i don't know programming only a little yawning smiley)

Options: ReplyQuote
FOUND
Posted by: Marc (@box.)
Date: January 01, 2004 08:00PM

I've found the solution.

Either KM's solution is not complete, or is broken (I've yet to test older version).
Anyway, here is the solution:

In macros.cfg add:

ESC_stop{
id(ID_NAV_STOP);
open("javascript:stop();");
}

in accel.cfg comment the old line and replace with:

#VK_ESCAPE = ID_NAV_STOP
VK_ESCAPE = macros(ESC_stop);


That's it.

Options: ReplyQuote
Re: Stop gif animation
Posted by: JohnHell
Date: January 01, 2004 10:48PM

OK we did!! (ok ok, you did ;oP)

Now Esc has the function to stop the loading of a page and when is loaded stop animations.

Nice work!

Version 0.8.2 works perfectly. Tested in various pages. Try http://www.gifmania.com with a lot of gifs (a page in spanish but that isn't a problem to test)

Options: ReplyQuote
Re: Stop gif animation
Posted by: Eyes-Only
Date: January 01, 2004 11:05PM

One comment: COOL!

No seriously---among my many ailments one of them is Epilepsy. Sorry to broadcast it---but sometimes some of these pages are so loaded with flashing gif files that the page is almost impossible to look at (actually flash can be harder). Occasionally it's nice to just have something to push to disable the darn stuff because there's pertinent info on the page but it's nigh impossible to see what with the flashing that's ready to send one into a seizure! Thanks for bringing this up JohnHell and for showing the proper fix Marc! Merci mille fois mon cousin lointain de moi! winking smiley

À la prochaine!

Eyes-Only
"L'Peau-Rouge"

Options: ReplyQuote
Re: Stop gif animation
Posted by: Marc (@box.)
Date: January 01, 2004 11:18PM

Je savais que je ferais des heureux. yawning smiley)

Options: ReplyQuote
Re: Stop gif animation
Posted by: efosb
Date: January 02, 2004 01:09AM

i know in IE if u just click the "stop" button at any time it will stop all animations, is there a way to make the stop button in KM stop animations after the page is loaded? i think it would be neat, im used to using the stop button to stop animations in sites loaded with animated gifs but i havent been accross a site since i left IE that was loaded with animated gifs so i forgot, lol. my bad,

Options: ReplyQuote
Re: Stop gif animation
Posted by: jsnj
Date: January 02, 2004 01:57AM

Get them to import and work? Not to save my life!

Right-click...Add Link to Bookmarks

Options: ReplyQuote
Re: Stop gif animation
Posted by: MonkeeSage
Date: January 03, 2004 12:25AM

efosb:

Just change the stop button definition in toolbars.cfg to use Marc's macro instead of ID_NAV_STOP.


Shelumi`El
Jordan

S.D.G

Options: ReplyQuote
Re: Stop gif animation
Posted by: efosb
Date: January 03, 2004 12:31AM

MonkeeSage:
If i used Marc's macro, will i still be able to use the stop button to stop a page from loading? just curious.

Options: ReplyQuote
Re: Stop gif animation
Posted by: Marc (@box.)
Date: January 03, 2004 12:46AM

Normally yes

Options: ReplyQuote
Re: Stop gif animation
Posted by: timoch
Date: January 04, 2004 05:47AM

I installed Marc's macro as described, but the escape button doesn't seem to stop the animations. Is there something I'm missing?

K-M .82 Win98

Options: ReplyQuote
Re: Stop gif animation
Posted by: JohnHell
Date: January 05, 2004 10:06PM

In macros.cfg add:

ESC_stop{
id(ID_NAV_STOP);
open("javascript:stop();");
}

in accel.cfg comment the old line and replace with:

#VK_ESCAPE = ID_NAV_STOP
VK_ESCAPE = macros(ESC_stop)

After this last line Marc added a semicolom (winking smiley don't add it to the script. Add exactly this post. It wokrs :-)

Options: ReplyQuote
Re: Stop gif animation
Posted by: Marc (@box.)
Date: January 06, 2004 01:13AM

JohnHell wrote:
> After this last line Marc added a semicolom (winking smiley don't add it
> to the script. Add exactly this post. It wokrs :-)

Oups... smiling smiley

Weird. It works on my system with the ;.

Anyway, here is a more complete accel.cfg modification. If you decide to disable the macro plugin, the accelerator won't work anymore. Even the built-in ID_NAV_STOP.

%ifplugin macros
VK_ESCAPE = macros(ESC_stop)
%else
VK_ESCAPE = ID_NAV_STOP
%endif


The macro stays unchanged.

Options: ReplyQuote
Re: Stop gif animation
Posted by: timoch
Date: January 06, 2004 06:40AM

Marc, JohnHell
I tried both scripts, but the animations still go on. They stop when I uncheck the "enable animated images" box. I do use Naviscope with the ad blocker enabled, would that make any difference?

Options: ReplyQuote
Re: Stop gif animation
Posted by: MonkeeSage
Date: January 06, 2004 08:05AM

timoch:

Do you have JavaScript enabled?


Shelumi`El
Jordan

S.D.G

Options: ReplyQuote
Re: Stop gif animation
Posted by: timoch
Date: January 07, 2004 07:08AM

Monkee
I recently installed Java Plug-in 1.4.2_03 and it seems to do what it's supposed to do. I can fill out forms and other stuff, so I imagine that JS is working too because the "enable java script" box is checked

Options: ReplyQuote
Re: Stop gif animation
Posted by: MonkeeSage
Date: January 07, 2004 08:04AM

timoch:

Just wondering because Marc's macro uses a JavaScript method to stop the animations. Since you have it enabled, not sure why else it wouldn't work. Very odd. I have not idea. :\

Ps. Just FYI, "JavaScript" is a bad name for it because it is completely distinct from "Java" and is native to the browser (it's technically ECMA262 Script but that's a mouthfull!).


Shelumi`El
Jordan

S.D.G

Options: ReplyQuote
Re: Stop gif animation
Posted by: Walt Stanley
Date: January 08, 2004 06:15AM

I added a button to the tool bar to call up the macro from Marc and it works fine for GIF's. Now, how about stopping the Flash animations and can a line be included in the macro for this?
Walt

Options: ReplyQuote
Re: Stop gif animation
Posted by: MonkeeSage
Date: January 08, 2004 07:12AM

According to the MacroMedia site, something along these lines should work:

javascript:var flashObj = document.getElementsByTagName("object"), j; for (j = 0; j < flashObj.length; j++) { flashObj[j].StopPlay(); }

...but it doesn't.

Neither does:

javascript:var flashObj = document.getElementsByTagName("object"), j; for (j = 0; j < flashObj.length; j++) { flashObj[j].name = "stopmovie"; document.stopmovie.StopPlay(); }


I'm thinking it might have something to do with the EOLAS Patent lawsuit.

Unless I'm doing something wrong it doesn't appear to be possible to stop Flash with JavaScript any longer...


Shelumi`El
Jordan

S.D.G

Options: ReplyQuote
Re: Stop gif animation
Posted by: Walt Stanley
Date: January 08, 2004 02:51PM

MonkeeSage: I'm not a programmer at all, but I do like puzzles. It looks like you are close to an answer and I hope someone can find the tweak. I don't think it will be me.
Thanks, Walt

Options: ReplyQuote
Re: Stop gif animation
Posted by: Nick
Date: January 08, 2004 06:50PM

The animated gif 'stop' very good, thank you.

OK, here's some info on the flash stuff - but it appears you need to somehow reap the ID/Name of the movie from the page before you can address it:

http://www.macromedia.com/support/flash/publishexport/scriptingwithflash/scriptingwithflash_03.html

Nick

Options: ReplyQuote
Pages: 12Next
Current Page: 1 of 2


K-Meleon forum is powered by Phorum.