General :  K-Meleon Web Browser Forum
General discussion about K-Meleon 
Default Browser - Again
Posted by: Mike Smith
Date: June 12, 2003 07:18PM


Folks:

Ok, so I set up K-Meleon as my default browser, cleared
out ddekeys, blah, blah, blah. But...

How can I force K-Meleon to open the link in an *existing*
window, versus opening a new one every time?

Options: ReplyQuote
Re: Default Browser - Again
Posted by: alain.NOSPAM.aupeix@wanadoo.fr
Date: June 13, 2003 06:27PM

I dont think so, but you can open a new layer in place of open a new window, which is
for me a little better.

You must do it with:

1) Right Click on the link and 'open in a new layer ' or 'open in a new layer in background'

2) the second way is to modify prefs.js (with or not a macro)
kmeleon.plugins.layers.catch = true to force layer

An example of macro and button to do it :

In macros.def

LWSync {
getpref(BOOL, "kmeleon.plugins.layers.catch") ? pluginmsg(toolbars, "CheckButton", "Policy Buttons, macros(LWToggle), 1") : pluginmsg(toolbars, "CheckButton", "Policy Buttons, macros(LWToggle), 0");
}

LWToggle {
$tmp = (getpref(BOOL, "kmeleon.plugins.layers.catch") ? false : true);
$Layer_default = $tmp
setpref(BOOL, "kmeleon.plugins.layers.catch", $tmp);
statusbar( ($tmp ? ">> Nouvelle fenêtre" : ">> Nouvel onglet"));
&LWSync;
}

OnStartup{
&LWSync;
}

in toolbars.def:

Layer {
macros(LWToggle)
New >> Window or Layer
newhot.bmp[13]
newcold.bmp[13]
newdead.bmp[13]
}

You can change with your button (newhot, cold and dead are mine and not on line
In Layer button is on, you have new layers else new windows

A little problem, is the System Quit button, which only close the active layer.

To close all layers (in fact windows) in the same time, You must use
File >> Exit (Ctrl-Alt-F4) or Create a new button:

Exit {
ID_APP_EXIT
Quit
newhot.bmp[15]
newcold.bmp[15]
newcold.bmp[15]
}

Options: ReplyQuote
Re: Default Browser - Again
Posted by: alain.NOSPAM.aupeix@wanadoo.fr
Date: June 13, 2003 06:39PM

Sorry, it's obviously menus.cfg and macros.cfg and not .def

:-)

Options: ReplyQuote
Re: Default Browser - Again
Posted by: po
Date: June 19, 2003 05:31AM

If you would like to block all links from opening in new windows (although i'm not sure if it prevents new windows from being generated by javascript - probably not) you can set this pref (by adding the line to your prefs.js file):

user_pref("browser.block.target_new_window", true);

Options: ReplyQuote
Re: Default Browser - Again
Posted by: po
Date: June 19, 2003 10:45PM

Oh... you meant opening a link from *another* application... oops.
Nevermind, i'm slow... smiling smiley

Maybe a command switch can be added for this, if you file an improvement request for it...

Options: ReplyQuote
Re: Default Browser - Again No Excuses.....
Posted by: zoom
Date: June 30, 2003 06:00AM

My problem stems from the fact that not all links embeded in email will open a Browser Window (Try http://www.paypal.com/) and that instead I have to copy the URL to the browser window, When I shouldn't have to do It at all. If Anyone says that It's a coding problem from the other end, They are nuts, If IE can do It then so should K-Meleon and that goes double for websites that have embeded the real (player) as well, It's a link and It should work. If this were a business that I owned, I would tell the programers to get It to work or I'll find someone else who can (error on their end or not, No Excuses). And I expect this problem to be solved. If these problems aren't solved I may go back to using IE or go to Firebird. And no I'm not interested in no 3rd party email programs, I like Outlook Express 6.0........ Also IE will allow Images to be saved and Yet K-Meleon won't allow any right clicking to do just that, Not even the properties are available for that matter. sad smiley

Options: ReplyQuote
Re: Default Browser - Again
Posted by: zoom
Date: June 30, 2003 06:44AM

That url should be https://www.paypal.com/ (or any other paypal type address for that matter, Like https://www.paypal.com/HELP or https://www.paypal.com/HISTORY) and It does seem like these are the only links that I've found that do not work Correctly (If at all) with K-Meleon..... Hint, Hint.... People the 1.3.1 Mozilla code is and has been finalized for some time, I would rather see K-Meleon 0.8 based on 1.3.1, Rather then wait longer for Mozilla 1.4x to become final at some time in the distant and unknown future (As I'm fresh out of DeLoreans). winking smiley And how about a speedup in the rendering too while I'm at It, A lot of the time If I'm doing something else like a long download IE 6.0 will load a website and K-Meleon (0.7.1 build 734) will just sit there twiddling It's Proverbial Thumbs...... It's pathetic..... No wonder some are Leaving for Other Browsers........ So people are saying that It's past time for the upgrade to point 0.8 and are leaving for elsewhere. Or as Picard (Of Star Trek the Next Generation fame) says "Make It so".

Options: ReplyQuote
Re: Default Browser - Again No Excuses.....
Posted by: Klaartje
Date: June 30, 2003 09:08AM

>If these problems aren't solved I may go back to using IE or go to Firebird.

If you don't like K-Meleon, you are free not to use it. Nobody asked you to.

Links in my e-mail open up in K-Meleon with no trouble at all, so it may just be you. Hint, Hint.... ;-)

Options: ReplyQuote
Re: Default Browser - Again
Posted by: jsnj
Date: June 30, 2003 09:59PM

Links in my e-mail open up in K-Meleon with no trouble at all, so it may just be you. Hint, Hint.... ;-)

Same here.

And how about a speedup in the rendering too while I'm at It, A lot of the time If I'm doing something else like a long download IE 6.0 will load a website and K-Meleon (0.7.1 build 734) will just sit there twiddling It's Proverbial Thumbs...... It's pathetic.

KM renders faster than IE on my PC. It never twiddles its thumbs unless the site in question has a problem which would effect all browsers trying to access it. Try adding the following in prefs. People have reported a marked speed increase with it included:

user_pref("nglayout.initialpaint.delay", 0);

websites that have embeded the real (player) as well, It's a link and It should work.

Do you have the realplayer plugin(s) in the plugins folder? Also, is the following in prefs?

user_pref("browser.helperApps.neverAsk.openFile", "audio/x-pn-realaudio, audio/x-realaudio, application/vnd.rn-realmedia");

Also IE will allow Images to be saved and Yet K-Meleon won't allow any right clicking to do just that

Yes it does, I do it all the time. There's a known bug that prevents the right-click image menu from appearing on some sites, so that may be what you're encountering.

Not even the properties are available for that matter. sad smiley

Copy & Paste the following:

IN MACROS:

page_info {
menu = "Page Properties";
$i = index($URL, "#");
$addr = $i==-1 ? $URL : substr($URL, 0, $i);
$client = index($addr, "https://")==0 ? "HTTP-memory-only" : "HTTP";
$var = "about:cache-entry?client=" . $client . "&sb=1&key=" . $addr;
index($addr, "http")==0 ? opennew($var) : "";
}

frame_info {
menu = "Frame Properties";
$i = index($FrameURL, "#");
$addr = $i==-1 ? $FrameURL : substr($FrameURL, 0, $i);
$client = index($addr, "https://")==0 ? "HTTP-memory-only" : "HTTP";
$var = "about:cache-entry?client=" . $client . "&sb=1&key=" . $addr;
index($addr, "http")==0 ? opennew($var) : "";
}


IN MENUS: (Under DocumentPopup & ImagePopup )

macros(page_info)

(Under FrameDocumentPopup & FrameImagePopup)

macros(frame_info)


The above will work with most webpages, not all. And you must be using cache. By default, K-meleon uses cache, so unless you changed the cache settings, it'll work. Also, keep in mind that you won't be getting the hand holding provided by IE or Netscape. KM offers most of the commonly used features in IE & Netscape and has capabilities they don't have, but you'll have to read the Documentation, check out the macros section, and search the forums, that's where you'll find the goodies and most of the answers to your questions. Trying to give a "good talking to" to the developers won't do you any good since they have neither the time nor inclination to worry about people who don't read the docs or search the forums.

Options: ReplyQuote
Re: Default Browser - Again
Posted by: zoom
Date: July 01, 2003 05:11AM

What I still need is a Macro for "Image Properties" I tried adapting "Page Properties" and I do get a Menu, But I get the "Page Properties" instead. No I didn't change the Cache settings, They are at 4096 still.


image_info {
menu = "Image Properties";
$i = index($URL, "#");
$addr = $i==-1 ? $URL : substr($URL, 0, $i);
$client = index($addr, "https://")==0 ? "HTTP-memory-only" : "HTTP";
$var = "about:cache-entry?client=" . $client . "&sb=1&key=" . $addr;
index($addr, "http")==0 ? opennew($var) : "";
}


Put this in the "ImagePopup" section of Menus in Prefs:

macros(image_info)


The macros(page_info) didn't work before and It didn't work afterward in ImagePopup at all. Oh and I just checked, Image Properties is only mentioned here, I searched. The above is a step in the right direction, But I'm no programmer of course.

Options: ReplyQuote
Re: Default Browser - Again
Posted by: zoom
Date: July 01, 2003 05:26AM

Well I tried altering the word index to image and It just gave Me an error, saying unknown command, so that's out so far, But It at least shows up in the menu correctly and It took page_info a bit to be displayed, But It does work now. It's right above macros(image_info) of course, But It does work.

Options: ReplyQuote
Re: Default Browser - Again
Posted by: MonkeeSage
Date: July 01, 2003 07:27AM

Try this:

image_info {
   menu = "Image Properties";
   $i = index($ImageURL, "#");
   $addr = $i==-1 ? $ImageURL : substr($ImageURL, 0, $i);
   $client = index($addr, "https://")==0 ? "HTTP-memory-only" : "HTTP";;
   $var = "about:cache-entry?client=" . $client . "&sb=1&key=" . $addr;
   index($addr, "http")==0 ? opennew($var) : "";
}


Shelumi`El
Jordan

S.D.G

Options: ReplyQuote
Re: Default Browser - Again
Posted by: MonkeeSage
Date: July 01, 2003 07:51AM

The above macro, when launched from the context menu over the KM logo, should open this page:

about:cache-entry?client=HTTP&sb=1&key=http://kmeleon.sourceforge.net/gfx/kmelogo.gif

Which gives you info about the size, type etc, of the image.

It doesn't give you the actual dimensions of the image though (W x H), but that could be done with javascript embedded in a macro, like so:

img_dimens {
   menu="Dimensions";
   open(" javascript:function XyZ(){if(document.images.length>0){var i;for(i=0;i<document.images.length;++ i){if(document.images[ i ].src.indexOf('" .$ImageURL. "') > -1){alert(\"Image Dimensions\\r\\n\\r\\nWidth: \" + document.images[ i ].width + \"\\r\\nHeight: \" + document.images[ i ].height);}}}}void(XyZ()); ");
}

Ps. Make sure that the line with that starts with open is all one line (no line breaks!) in your macros.cfg file.


Shelumi`El
Jordan

S.D.G

Options: ReplyQuote
Re: Default Browser - Again
Posted by: MonkeeSage
Date: July 01, 2003 07:52AM

oops...

img_dimens&nbsp;{
&nbsp;&nbsp;&nbsp;menu="Dimensions";
&nbsp;&nbsp;&nbsp;open("&nbsp;javascript:function&nbsp;XyZ(){if(document.images.length>0){var&nbsp;i;for(i=0;i<document.images.length;++&nbsp;i){if(document.images[&nbsp;i&nbsp;].src.indexOf('"&nbsp;.$ImageURL.&nbsp;"')&nbsp;>&nbsp;-1){alert(\"Image&nbsp;Dimensions\\r\\n\\r\\nWidth:&nbsp;\"&nbsp;+&nbsp;document.images[&nbsp;i&nbsp;].width&nbsp;+&nbsp;\"\\r\\nHeight:&nbsp;\"&nbsp;+&nbsp;document.images[&nbsp;i&nbsp;].height);}}}}void(XyZ());&nbsp;");
}


Shelumi`El
Jordan

S.D.G

Options: ReplyQuote
Re: Default Browser - Again
Posted by: MonkeeSage
Date: July 01, 2003 08:10AM

Here is a fancier version of the macro (tells you width, height, url and alternate text):

img_props&nbsp;{
&nbsp;&nbsp;&nbsp;menu="Properties";
&nbsp;&nbsp;&nbsp;open("&nbsp;javascript:function&nbsp;XyZ(){if(document.images.length>0){var&nbsp;i;for(i=0;i<document.images.length;++&nbsp;i){if(document.images[&nbsp;i&nbsp;].src.indexOf('"&nbsp;.$ImageURL.&nbsp;"')&nbsp;>&nbsp;-1){alert(\"Image&nbsp;Properties\\r\\n\\r\\nWidth:&nbsp;&nbsp;\"&nbsp;+&nbsp;document.images[&nbsp;i&nbsp;].width&nbsp;+&nbsp;\"\\r\\nHeight:&nbsp;&nbsp;\"&nbsp;+&nbsp;document.images[&nbsp;i&nbsp;].height&nbsp;+&nbsp;\"\\r\\nAlt:&nbsp;&nbsp;\"&nbsp;+&nbsp;document.images[&nbsp;i&nbsp;].alt&nbsp;+&nbsp;\"\\r\\nURL:&nbsp;&nbsp;\"&nbsp;+&nbsp;document.images[&nbsp;i&nbsp;].src);}}}}void(XyZ());&nbsp;");
}



Shelumi`El
Jordan

S.D.G

Options: ReplyQuote
Re: Default Browser - Again
Posted by: asmpgmr
Date: July 01, 2003 02:05PM

If you simply open an image in its own window the dimensions are in the page title.

Options: ReplyQuote
Re: Default Browser - Again
Posted by: zoom
Date: July 01, 2003 06:11PM

Well the java version worked, But, I found that I couldn't copy and paste It like I wanted, It also doesn't show up under all images too for some reason. I had to alter the first two lines to get It to work though, But It does show a nice javascript window.



image_info {
menu="Image Properties";
open(" javascript:function XyZ(){if(document.images.length>0){var i;for(i=0;i<document.images.length;++ i){if(document.images[ i ].src.indexOf('" .$ImageURL. "') > -1){alert(\"Image Properties\\r\\n\\r\\nWidth: \" + document.images[ i ].width + \"\\r\\nHeight: \" + document.images[ i ].height + \"\\r\\nAlt: \" + document.images[ i ].alt + \"\\r\\nURL: \" + document.images[ i ].src);}}}}void(XyZ()); ");
}


I just got to this page after a 1 or so minute wait, Is the server experiencing heavy traffic?

Options: ReplyQuote
Re: Default Browser - Again
Posted by: zoom
Date: July 01, 2003 07:39PM

At least one website OCWorkbench.com would do this (I wish K-Meleon's forum had a preview function) and It would allow the Image Properties menu selection to appear, But It wouldn't work, possibly cause of the name of the file "Picture%201761%20copy.jpg".

<img border="0" src="Picture%201761%20copy.jpg" width="400" height="427">

Options: ReplyQuote
Re: Default Browser - Again
Posted by: zoom
Date: July 01, 2003 07:47PM

That should have been like this:



And the little bit of html there is partly from IE and K-Meleon 0.7.1.

IE found this part: http://www.ocworkbench.com/2003/dfi/nf2ultra/Picture%201761%20copy.jpg
K-Meleon found nothing (Bug maybe?)

Options: ReplyQuote
Re: Default Browser - Again
Posted by: zoom
Date: July 01, 2003 07:48PM



Options: ReplyQuote
Re: Default Browser - Again
Posted by: zoom
Date: July 01, 2003 07:51PM

My 3rd and final attempt, It seems the forum doesn't like mixing text and images....
Or I just don't know how to do It properly here.


Options: ReplyQuote
Re: Default Browser - Again
Posted by: zoom
Date: July 01, 2003 07:54PM

Or even displaying images for that matter, oh well. It's not a big deal.

Options: ReplyQuote
Help w/Java Image Properties by MonkeeSage
Posted by: zoom
Date: July 02, 2003 10:13PM

MonkeeSage I really like the bottom Java Code (Lower) Better than the Non Java Code (Upper). Is there a way to add the Linkable Image line from the 1st one to the Java one on the Bottom here? Right now I'm using both, But the top one is overkill for Me, That and I'd like to Rename the Java code to "Image Properties" or "Properties", Instead of "Java Script Application" which sounds nondescript and/or ominous too.


image_info {
menu = "Image Properties";
$i = index($ImageURL, "#");
$addr = $i==-1 ? $ImageURL : substr($ImageURL, 0, $i);
$client = index($addr, "https://")==0 ? "HTTP-memory-only" : "HTTP";
$var = "about:cache-entry?client=" . $client . "&sb=1&key=" . $addr;
index($addr, "http")==0 ? opennew($var) : "";
}

img_info {
menu="Java Image Properties";
open(" javascript:function XyZ(){if(document.images.length>0){var i;for(i=0;i<document.images.length;++ i){if(document.images[ i ].src.indexOf('" .$ImageURL. "') > -1){alert(\"Image Properties\\r\\n\\r\\nWidth: \" + document.images[ i ].width + \"\\r\\nHeight: \" + document.images[ i ].height + \"\\r\\nAlt: \" + document.images[ i ].alt + \"\\r\\nURL: \" + document.images[ i ].src);}}}}void(XyZ()); ");
}


Options: ReplyQuote
Re: Default Browser - Again
Posted by: MonkeeSage
Date: July 03, 2003 02:01PM

zoom:

The title of Javascript "applications" like the alert() method uses is not something that Mozilla gave the user access to for some reason or other. You would think that it would be passed as a parameter to the method, but for for some reason they didn't make it work that way. The title is static, meaning it can't be changed to say "Properties" or something different for different times.

But, what you can do is this:

1. Make a copy of \chrome\en-US.jar

2. Rename the copy to un-US.zip

3. Extract the contents somewhere (preserve the structure).

4. Edit \en-US\contents\en-US\global\commonDialogs.properties in a text editor, and change this line:

ScriptDlgTitle=[JavaScript Application] %S

And make it something like:

ScriptDlgTitle=K-Meleon %S

or:

ScriptDlgTitle=Info %S

or something that will work for all different kinds of alerts (like on web pages, &c).

5. Repack the directory starting with contents\ (preserve structure) as en-US.zip

6. Rename en-US.zip to en-US.jar.

7. Rename the current en-US.jar in your \chrome directory to en-US.jar_original

8. Copy the en-US.jar you made to the \chrome directory.

9. See if it worked. You should now see the name you put for Javascript alerts, confirms, and prompts.

smiling smiley


Shelumi`El
Jordan

S.D.G

Options: ReplyQuote
Re: Default Browser - Again
Posted by: MonkeeSage
Date: July 03, 2003 02:30PM

Here is an ever better way...

4. above should be like this:

4. Edit \en-US[b]locale[/b]\en-US\global\commonDialogs.properties in a text editor, and change this line:


And make it this:

ScriptDlgTitle=%S


-- This will make it just say [Script] for alert() and confirm(), but for prompt(), it will work exactly like you wanted:


So...make the macro like this after you have changed the en-US.jar file like described above:

img_info&nbsp;{
&nbsp;&nbsp;&nbsp;menu="Image&nbsp;Properties";
&nbsp;&nbsp;&nbsp;open("&nbsp;javascript:function&nbsp;XyZ(){if(document.images.length>0){var&nbsp;i;for(i=0;i<document.images.length;++&nbsp;i){if(document.images[&nbsp;i&nbsp;].src.indexOf('"&nbsp;.$ImageURL.&nbsp;"')&nbsp;>&nbsp;-1){alert(\"Image&nbsp;Properties\\r\\n\\r\\nWidth:&nbsp;\"&nbsp;+&nbsp;document.images[&nbsp;i&nbsp;].width&nbsp;+&nbsp;\"\\r\\nHeight:&nbsp;\"&nbsp;+&nbsp;document.images[&nbsp;i&nbsp;].height&nbsp;+&nbsp;\"\\r\\nAlt:&nbsp;\"&nbsp;+&nbsp;document.images[&nbsp;i&nbsp;].alt&nbsp;+&nbsp;\"\\r\\n\",&nbsp;document.images[&nbsp;i&nbsp;].src,&nbsp;"Image&nbsp;Properties");}}}}void(XyZ());&nbsp;");
}

Now you have a nice title, all the info, and a selected URL (in the edit box), so you can ctrl+c copy it. winking smiley


Shelumi`El
Jordan

S.D.G

Options: ReplyQuote
Re: Default Browser - Again
Posted by: MonkeeSage
Date: July 03, 2003 02:40PM

LOL, oops, that didn't work right, ignore that very last post ;P

Make

ScriptDlgTitle=

whatever you want, and leave the macro as it was.


Shelumi`El
Jordan

S.D.G

Options: ReplyQuote
Re: Default Browser - Again
Posted by: MonkeeSage
Date: July 03, 2003 03:09PM

This one makes it have just an ampersand for alert and confirm:

ScriptDlgTitle=&› %S


Shelumi`El
Jordan

S.D.G

Options: ReplyQuote


K-Meleon forum is powered by Phorum.