choosing a browser with Frontier 7.01 Mac OS X

Matt Neuburg matt at tidbits.com
Sun Oct 7 09:47:48 PDT 2001


This raises an important issue: webbrowser.supportedBrowsers is not a 
user preference. In fact, it's a script! So the list of 
supportedBrowsers is hard-coded!

Thus, if UserLand doesn't "authorize" the use of iCab, you can't use 
it "legally", because no user preference is being consulted. For this 
reason, Guy is compelled to some fairly skanky maneuvers here.

I suggest that at the very least webbrowser.supposertedbrowsers 
should consult a list at user.webbrowser.supportedbrowsers; this 
would have allowed Guy to insert iCab at the head of the list.

m.

On Sat, 6 Oct 2001 06:16:25 +0200, guy.jacquesson at wanadoo.fr said:

>
>
>--Apple-Mail-196981071-4
>Content-Transfer-Encoding: quoted-printable
>Content-Type: text/plain;
>	format=flowed;
>	charset=iso-8859-1
>
>Hello,
>
>I recently posted a message for help in the Frontier.users List... but=20=
>
>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=20=
>
>case, 'iCAB'.
>Why ?
>a)  It is often necessary to preview web pages into different browsers,=20=
>
>because they DO NOT allways interpret HTML - and JavaScript! - in the=20
>SAME way...
>b) iCAB is very strict on parsing javascript and html code: using it,=20
>the debugging is easy, and after that, your code is really clean... it=20=
>
>is not true for so many pages on the web!
>
>In version 7.01, Frontier is considering that MSIE is the default=20
>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
>=ABif webBrowser.isRunning ()
>	=ABreturn (user.webBrowser.currentid ) // a supported browser is=20=
>
>already running.
>=ABid =3D 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=20
>me - it differs from MSIE, so I must modify it)
>after "s=3Dstring.popLeading(s,'/')"
>
>ADDED
>if  user.webBrowser.currentid =3D=3D '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=20
>scripts "activate, openDocument, openUrl,printDocument, quit"
>
>4)ADDED an item "iCAB" in the custom Menu for the script
>on iCab()
>	user.webBrowser.currentid=3D"iCAB"
>=09
>It works fine to test my web pages locally.
>
>
>
>Guy Jacquesson
>email: guy.jacquesson at wanadoo.fr
>
>
>--Apple-Mail-196981071-4
>Content-Transfer-Encoding: quoted-printable
>Content-Type: text/enriched;
>	charset=iso-8859-1
>
>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...=20
>
>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...=20
>
>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:
>
>
><bold>1) in "system.verbs.builtins.webBrowser.launch"</bold>
>
>- toggled these 3 lines into comment=20
>
>=ABif webBrowser.isRunning ()
>
>	=ABreturn (user.webBrowser.currentid ) // a supported browser is
>already running.
>
>=ABid =3D webBrowser.getDefaultBrowser ()
>
>-ADDED these in "case id"
>
>'iCAB'
>
>	if app.start (@iCAB)
>
>		webBrowser.bringToFront ()
>
>		return ('iCAB')
>
>
><bold>2) in "system.verbs.builtins.html.getFileURL"
>
></bold>(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=3Dstring.popLeading(s,'/')"
>
>
>ADDED
>
>if  user.webBrowser.currentid =3D=3D 'iCAB'=20
>
>	return ("file://localHost/"+encodedVolume+"/"+s)
>
>
><bold>3)ADDED a new table entry for iCAB into "system.verbs.apps"
>table:
>
></bold>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"
>
>
><bold>4)ADDED an item "iCAB" in the custom Menu for the script
>
></bold>on iCab()
>
>	user.webBrowser.currentid=3D"iCAB"
>
>=09
>
>It works fine to test my web pages locally.
>
>
>
>
>Guy Jacquesson
>
>email: guy.jacquesson at wanadoo.fr
>
>
>
>--Apple-Mail-196981071-4--
>
>
>
>
>End of Frontier-Users Digest
>

-- 

matt neuburg, phd = matt at tidbits.com, http://www.tidbits.com/matt
pantes gar anthropoi tou eidenai oregontai phusei




More information about the Frontier-Users mailing list