mIRC Homepage
IRC links in webpages are great...when people include them in their html. Often times the author of the webpage I'm reading has given server and channel information without providing a simple <a href="irc://servername.tld/channel" target="_blank">irc://servername.tld/channel</a> link. I've put together a bit of javascript and a registry file to create a context menu item for Internet Explorer. After adding these, you will be able to highlight server info like irc.example.com then right-click it, choose 'Go To IRC' and mIRC will launch.

Here's the javascript code:

Code:
&lt;HTML&gt;
&lt;SCRIPT LANGUAGE="JavaScript" defer&gt; 
var parentwin = external.menuArguments;
var doc = parentwin.document;
var sel = doc.selection;
var rng = sel.createRange();
var str = new String(rng.text); 
var op = new String ("irc://"+str);
L_Alert_Message = "You must select the IRC server text to connect to IRC.";

if (str=="")
	alert (L_Alert_Message);
else
	parentwin.navigate(op);

&lt;/SCRIPT&gt;
&lt;/HTML&gt;

  


Save that file as c:\windows\web\gotoirc.htm or any other appropriate path/filename you choose.

Here's the registry file:

Code:
REGEDIT4

[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt\&amp;Go To IRC]
@="[color:red]c:\\windows\\web\\gotoirc.htm[/color]"
"contexts"=hex:10

  


Place that file anywhere, you could save it in the same directory as the html file.

NOTE: The path/filename in the registry file matches the location of the html file, adjust yours accordingly if needed. The double \\ in the registry path is correct.

Once you've saved the registry file somewhere, simply right-click it and select Merge to load it into the registry, then close all IE windows.

Make sure you have chat links enabled: ALT+O > IRC > Catcher

Check the "Enable support" box and for convenience reasons you might like to check the "confirm requests" box. The Chat Links page has more information on enabling chat links.

The next time you open IE, select the IRC server text with the mouse (like, dragons.ca.us.dal.net for example) and the right-click context menu will now have the 'Go To IRC' option, select it and mIRC will launch and connect to the server.

Would you happen to know the Reg path to add the same functionaly to Mozilla Firefox?

Thanks!
yes, my exact question, it dont work in MFF :'(
From what I've been able to gather Firefox doesn't use the Windows registry in association with context menus. You'll need to make some XUL overlays in browser.xul and look at contents.rdf to do the chrome registry. Good Luck.
:} be my guest
© mIRC Discussion Forums