General :  K-Meleon Web Browser Forum
General discussion about K-Meleon 
Userscripts
Posted by: gman2083
Date: November 16, 2010 10:47AM

Is there a way to implement userscripts into Kmeleon 1.6 as you would with Opera?

Options: ReplyQuote
Re: Userscripts
Posted by: jk--
Date: November 20, 2010 12:19PM

http://www.digivill.net/~joykillr/kmeleon/kmeleon_userscripts.html
http://www.digivill.net/~joykillr/kmeleon/greasify-.7.9.3.6-utf8.kmm

Greasify works in 1.6 but you have to set the prefs manually. The interface doesn't work correctly after 1.16, haven't had time to figure out why, but if you set the prefs everything else works.

Quote

To get Greasify working with K-Meleon 1.6, manually set the follownig preferences:
user_pref("kmeleon.plugins.macros.greasify.directory", "C:\\scripts\\directory");
user_pref("kmeleon.plugins.macros.greasify.enable_toolbar", true);
user_pref("kmeleon.plugins.macros.greasify.enablednew", true);
user_pref("kmeleon.plugins.macros.greasify.statbarnew", true);

- Download and install wget.exe and you can then install scripts off userscripts.org.
http://gnuwin32.sourceforge.net/packages/wget.htm

Options: ReplyQuote
Re: Userscripts
Posted by: desga2
Date: November 21, 2010 07:17PM

@ jk--:

If you have to setting manually this prefs to your macro work is because you aren't setting it in you kmm code.
Check that you have a setpref() for this preferences that you are indicating in above post.
At least one of these is not setting. (enablednew)

If you need this prefs exist before macro can be used yuo can add an macro function to onLoad event to check if this pref exist and if this prefs not exist you can defined it to a default value with a setpref().

K-Meleon in Spanish

Options: ReplyQuote
Re: Userscripts
Posted by: jk--
Date: November 22, 2010 08:06AM

desaga2: It still doesn't work. Here is an example:
_testbool{
getpref(BOOL,"kmeleon.plugins.macros.testui")==0?setpref(BOOL,"kmeleon.plugins.macros.testui",true):0;
}

_testbool_toggle{
togglepref(BOOL,"kmeleon.plugins.macros.testui");
menuchecked=getpref(BOOL,"kmeleon.plugins.macros.testui");
}

_testui_BuildMenu{
setmenu(PrivacySecurity,macro,"&testUI",_testbool_toggle);
}

$OnInit=$OnInit."_testui_BuildMenu;_testbool;";

The menu item does not toggle the pref.

Options: ReplyQuote
Re: Userscripts
Posted by: siria
Date: November 22, 2010 09:39AM

perhaps try =="false" instead of ==0 ?
No wait, simply this:
getpref(BOOL,"kmeleon.plugins.macros.testui")? setpref....
What does the error console tell...?



Edited 2 time(s). Last edit at 11/22/2010 10:18AM by siria.

Options: ReplyQuote
Re: Userscripts
Posted by: jk--
Date: January 17, 2011 04:59AM

Quote
jk--
desaga2: It still doesn't work. Here is an example:
_testbool{
getpref(BOOL,"kmeleon.plugins.macros.testui")==0?setpref(BOOL,"kmeleon.plugins.macros.testui",true):0;
}

_testbool_toggle{
togglepref(BOOL,"kmeleon.plugins.macros.testui");
menuchecked=getpref(BOOL,"kmeleon.plugins.macros.testui");
}

_testui_BuildMenu{
setmenu(PrivacySecurity,macro,"&testUI",_testbool_toggle);
}

$OnInit=$OnInit."_testui_BuildMenu;_testbool;";

The menu item does not toggle the pref.

Does this work for anyone else?

Options: ReplyQuote
Re: Userscripts
Posted by: JujuLand
Date: January 17, 2011 07:59AM

Try to invert the order of the lines:

_testbool_toggle{
menuchecked=getpref(BOOL,"kmeleon.plugins.macros.testui");
togglepref(BOOL,"kmeleon.plugins.macros.testui");
}

A+



Mozilla/5.0 (x11; U; Linux x86_64; fr-FR; rv:38.0) Gecko/20100101 Ubuntu/12.04 K-Meleon/76.0


Web: http://jujuland.pagesperso-orange.fr/
Mail : alain [dot] aupeix [at] wanadoo [dot] fr



Ubuntu 12.04 - Gramps 3.4.9 - Harbour 3.2.0 - Hwgui 2.20-3 - K-Meleon 76.0 rc



Options: ReplyQuote
Re: Userscripts
Posted by: jk--
Date: January 19, 2011 10:03AM

Quote
JujuLand
Try to invert the order of the lines:

_testbool_toggle{
menuchecked=getpref(BOOL,"kmeleon.plugins.macros.testui");
togglepref(BOOL,"kmeleon.plugins.macros.testui");
}

A+

Thanks Jujuland that was it! I guess menuchecked must always be the first thing in a macro?



Edited 1 time(s). Last edit at 01/19/2011 10:05AM by jk--.

Options: ReplyQuote
Re: Userscripts
Posted by: JujuLand
Date: January 19, 2011 05:11PM

Yes it must be the first line of the macro.

A+



Mozilla/5.0 (x11; U; Linux x86_64; fr-FR; rv:38.0) Gecko/20100101 Ubuntu/12.04 K-Meleon/76.0


Web: http://jujuland.pagesperso-orange.fr/
Mail : alain [dot] aupeix [at] wanadoo [dot] fr



Ubuntu 12.04 - Gramps 3.4.9 - Harbour 3.2.0 - Hwgui 2.20-3 - K-Meleon 76.0 rc



Options: ReplyQuote


K-Meleon forum is powered by Phorum.