On or about 28 Feb, 2002, Doug Kaufman <[EMAIL PROTECTED]> wrote: > Perhaps someone here will have some insight into what is happening on > the Microsoft site and let me know if there is a simple configuration > tweak to lynx to make navigation easier. I frequently go to the > Security Bulletin section of the site to review security defects > found and to obtain patches. The URL that used to work to get there > was: "http://www.microsoft.com/technet/security/current.asp".; If you > use this now you get a menu, with all links going back to itself. > You can get to the information I want by adding "?frame=false" to > the end of the URL. However, each subsequent link to a bulletin > also has to be edited to add the "?frame=false", or it goes back > to the same menu page. I can continue to type "E" to edit the link > and add the "?frame=false" but it does get tiresome. The link > that now works to get to the section of Microsoft that I want is > "http://www.microsoft.com/technet/security/current.asp?frame=false"
I think "CERNRULES" might help. I tried it with: RULE:Pass http://www.microsoft.com/technet/security/*?frame=false RULE:Redirect http://www.microsoft.com/technet/security/* http://www.microsoft.com/technet/security/*?frame=false and it seemed to work fine. Note: RULE:'s are one-liners, broken here for readability. The "Pass" rule (to prevent looping) wouldn't be needed if you use: RULE:Redirect http://www.microsoft.com/technet/security/*.asp http://www.microsoft.com/technet/security/*.asp?frame=false , if that pattern fits all the cases you run into. When it works, it's invisible and automatic. It breaks, however, if MS changes things too much on their site, and occasional tweaking may be required. Another possible, though rare in my experience, problem would be if an occasional link URL fits the pattern you use, but tacking on the "?frame=false" gets a 404 Not Found. There's no easy way to turn the rules processing on/off for a particular link ( O)ptions->Check Cfg->edit->Reload Changes ), so I aliased lynx to use -cfg=lxrules.cfg . lxrules.cfg contains the line "INCLUDE:lynx.cfg" and my RULES. Then I set up an EXTERNAL in lynx.cfg to spawn "lynx -child -cfg=lynx.cfg", thus bypassing all the RULES in lxrules.cfg . If there are RULES you want to *always* use, they can go in lynx.cfg . Tangentially, you can even teach lynx to do javascript, sort of. Slate uses javascript to pop up a window with the printer-friendly version of a page. For the bash shell, I do "export javascript_proxy=X", and put the following in lxrules.cfg: RULE:UseProxy javascript:* none RULE:Redirect "javascript:toolAction('print', *)" http://slate.msn.com/toolbar.aspx?action=print&id=* Note the double quotes to preserve the embedded space. I downloaded the foo.js file specified in the page source and read through the code to figure out the redirection URL--more trouble than it's worth from a practical standpoint, but it did work. See lynx_doc/samples/cernrules.txt for more info. -- Michael Warner | Procrastinate now. <[EMAIL PROTECTED]> | ; To UNSUBSCRIBE: Send "unsubscribe lynx-dev" to [EMAIL PROTECTED]
