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:
<HTML>
<SCRIPT LANGUAGE="JavaScript" defer>
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);
</SCRIPT>
</HTML>
Save that file as
c:\windows\web\gotoirc.htm or any other appropriate path/filename you choose.
Here's the registry file:
REGEDIT4
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt\&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.