General
: K-Meleon Web Browser Forum
General discussion about K-Meleon
Your IP address, domain or ISP has been blocked. Please contact the forum administrators.
Go to:
Forum List
•
Message List
•
Search
•
Log In
Your Name:
Subject:
Help information
BBcode help
Smileys help
[quote=kko] Yes, jsnj, setting the title of a page as filename is indeed a potential source of strangenesses. The reason is, that a page's title can contain characters, that are invalid for a filename (like colons). I forgot about that - nobody's perfect ;-) Here is an updated version of "Shortcut.js": if (WScript.Arguments.length) { function Sanitize(string) { // replace invalid characters by whitespaces var invalid = new Array('*','"','<','>','|','\\','/',':','?'); for (var i in invalid) string = string.replace(invalid[i]," "); return string; } var Arg = WScript.Arguments; var WSS = new ActiveXObject("WScript.Shell"); var FSO = new ActiveXObject("Scripting.FileSystemObject"); var LnkName = (Arg.length > 1) ? Sanitize(Arg(1)) : "New Internet Shortcut"; var LinkLoc = WSS.SpecialFolders("Desktop") + "\\"; var i=0; for (; FSO.FileExists(LinkLoc+LnkName+((i)?(" ("+i+").url"):".url")); i++); LnkName += (i) ? (" ("+i+").url") : ".url"; var Lnk = WSS.CreateShortcut(LinkLoc+LnkName); Lnk.TargetPath = Arg(0); Lnk.Save(); }[/quote]
[Please Enable JavaScript]
K-Meleon forum is powered by
Phorum
.
Home/News
Screenshots
Download
Documentation
Resources
Get Involved
Forum
FAQ
English