choosing a browser with Frontier 7.01 Mac OS X

guy.jacquesson at wanadoo.fr guy.jacquesson at wanadoo.fr
Fri Oct 5 21:16:25 PDT 2001


Hello,

I recently posted a message for help in the Frontier.users List... but 
before getting any answer, I think I've done the job by myself...
So I think it may be usefull to explain my patch.

The problem (for me) was :
- to choose a browser to preview/publish my pages locally, and in this 
case, 'iCAB'.
Why ?
a)  It is often necessary to preview web pages into different browsers, 
because they DO NOT allways interpret HTML - and JavaScript! - in the 
SAME way...
b) iCAB is very strict on parsing javascript and html code: using it, 
the debugging is easy, and after that, your code is really clean... it 
is not true for so many pages on the web!

In version 7.01, Frontier is considering that MSIE is the default 
browser; and if it is running, Frontier doesn't look elsewhere...

Here are the changes I've made to Frontier.root:

1) in "system.verbs.builtins.webBrowser.launch"
- toggled these 3 lines into comment
«if webBrowser.isRunning ()
	«return (user.webBrowser.currentid ) // a supported browser is 
already running.
«id = webBrowser.getDefaultBrowser ()
-ADDED these in "case id"
'iCAB'
	if app.start (@iCAB)
		webBrowser.bringToFront ()
		return ('iCAB')

2) in "system.verbs.builtins.html.getFileURL"
(the way this beta version of iCAB writes URLs seems a bit strange to 
me - it differs from MSIE, so I must modify it)
after "s=string.popLeading(s,'/')"

ADDED
if  user.webBrowser.currentid == 'iCAB'
	return ("file://localHost/"+encodedVolume+"/"+s)

3)ADDED a new table entry for iCAB into "system.verbs.apps" table:
duplicate the entry for "msExplorer", change its name to "iCAB" and...
-  replace "MSIE' by 'iCAB" for the id entry
  - replace all occurrences of "msExplorer.id" by "iCAB.id" in the 
scripts "activate, openDocument, openUrl,printDocument, quit"

4)ADDED an item "iCAB" in the custom Menu for the script
on iCab()
	user.webBrowser.currentid="iCAB"
	
It works fine to test my web pages locally.



Guy Jacquesson
email: guy.jacquesson at wanadoo.fr

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 2071 bytes
Desc: not available
Url : http://lists.userland.com/pipermail/frontier-users/attachments/20011006/29b307e8/attachment-0002.bin


More information about the Frontier-Users mailing list