General :  K-Meleon Web Browser Forum
General discussion about K-Meleon 
Java Pref
Posted by: jsnj
Date: February 03, 2003 08:24AM

What's the setting in prefs.js that controls whether Java is enabled or not? Not JavaScript but Java. I wanna toggle it's setting with a macro and toolbar button.

Options: ReplyQuote
Re: Java Pref
Posted by: MonkeeSage
Date: February 03, 2003 08:34AM

I think it be:

user_pref("security.enable_java", true);


Shelumi`El
Jordan

S.D.G

Options: ReplyQuote
Re: Java Pref
Posted by: jsnj
Date: February 03, 2003 09:36AM

Thanks, it works now. Although it's strange that that pref only appears in prefs.js when java is disabled. When java is enabled, it disappears from the prefs.js file instead of showing it's set to true. But the toolbar toggled state button works fine.

http://home.attbi.com/~jsnj/layersicon.png

Options: ReplyQuote
Re: Java Pref
Posted by: MonkeeSage
Date: February 03, 2003 09:43AM

How are you determining if a custom button should be dead or not? Can you put macro code in the toolbars.cfg file? (What am I missing here?)...

That a really nice feature (java enable / disable button), BTW.


Shelumi`El
Jordan

S.D.G

Options: ReplyQuote
Re: Java Pref
Posted by: rmn
Date: February 03, 2003 10:25AM

Interesting. I thought you need to restart KM for java enable/disable settings to work.

Options: ReplyQuote
Re: Java Pref
Posted by: jsnj
Date: February 03, 2003 05:31PM

I know that the setting does change because when I press the button, going back into prefences-general, the Enable Java check changes and as I mentioned above, the setting in prefs changes too. I haven't yet checked to see if it makes a difference in that current session whether java reacts or not. The Popup toggle button does have an effect on the current session, that I know. Thanks to Po for these macros.

In macros

buttonSync {
getpref(BOOL, "dom.disable_open_during_load") ? pluginmsg(toolbars, "CheckButton", "Tool Bar, macros(PBToggle), 1") : pluginmsg(toolbars, "CheckButton", "Tool Bar, macros(PBToggle), 0");
getpref(BOOL, "security.enable_java") ? pluginmsg(toolbars, "CheckButton", "Tool Bar, macros(java), 1") : pluginmsg(toolbars, "CheckButton", "Tool Bar, macros(java), 0");
}

PBToggle {
$tmp = (getpref(BOOL, "dom.disable_open_during_load") ? false : true);
setpref(BOOL, "dom.disable_open_during_load", $tmp);
statusbar("Popups " . ($tmp ? "BLOCKED" : "ALLOWED"));
&buttonSync;
}

java{
$tmp = (getpref(BOOL, "security.enable_java") ? false : true);
setpref(BOOL, "security.enable_java", $tmp);
statusbar("Java " . ($tmp ? "ENABLED" : "DISABLED"));
&buttonSync;
}

OnStartup{
&buttonSync;
}

In Toolbars

Popup Button {
macros(PBToggle)
Block or Allow Popups
toolcold.bmp[7]
tooldead.bmp[7]
tooldead.bmp[7]
}
Java{
macros(java)
Enable or Disable Java
javahot.bmp
javacold.bmp
javacold.bmp
}

Options: ReplyQuote
Re: Java Pref
Posted by: jsnj
Date: February 03, 2003 05:50PM

Just checked. Works perfectly. It had an immediate effect on the current session.
On a related issue, does anyone know how to get rid of the java icon that appears in the taskbar once you've left a site that uses java? It only disappears when you close the browser regardless of whether you need it or not. It's not a KM specific issue, but I just wondered if it was possible to get rid of that thing that hogs resources when I don't need it anymore.

Options: ReplyQuote
Re: Java Pref
Posted by: MonkeeSage
Date: February 03, 2003 05:52PM

Ahhh, very interesting... smiling smiley Thanks for the info!


Shelumi`El
Jordan

S.D.G

Options: ReplyQuote
Re: Java Pref
Posted by: jsnj
Date: February 03, 2003 05:53PM

Sorry, not taskbar but system tray

Options: ReplyQuote
Re: Java Pref
Posted by: MonkeeSage
Date: February 03, 2003 05:58PM

jsnj:

I think is is a setting in the control panel configuration applet for the JRE, or mabye you get to that settings dialog by right click...i can't recall...but one of those two ways, cause those are the only thing I know and mine is off somehow. smiling smiley

Options: ReplyQuote
Re: Java Pref
Posted by: jsnj
Date: February 03, 2003 06:41PM

I tried fiddling with all the options presented in java via the control menu but to no avail and right-clicking the system tray icon is pretty much useless. That little icon remains until the browser is closed. Ah well, just a minor annoyance. But it's one of the main reasons I have that toggle button to prevent sites from calling java where I hadn't anticipated, because it forever remains visible once it's called.

Options: ReplyQuote
Re: Java Pref
Posted by: Nick
Date: February 03, 2003 06:52PM

On my version of Java -> 1.4.1_01, there is an option to 'not show' the icon in the systray - in the Control Panel applet... on the basic tab.

Nick

Options: ReplyQuote
Re: Java Pref
Posted by: jsnj
Date: February 03, 2003 06:56PM

Oh ok thanks, I'll upgrade then. I'm still on 1.3.1_03

Options: ReplyQuote


K-Meleon forum is powered by Phorum.