JavaScript

The following urlcp settings control JavaScript behavior. Note that most of these settings do not take effect unless the javascript setting is on:

  • javascript (boolean)

    If on, JavaScript is enabled in documents: inline <script language="JavaScript">...</script> scripts in fetched documents are executed, which may affect the formatted text and links. Other document JavaScript actions are also enabled, as controlled by settings below. If off (default), JavaScript is disabled for documents (but may still be used for proxy auto-config, if PAC enabled; e.g.pacurl/pacscript here). Returns previous value. Added in version 4.01.1023500000 20020607.

  • screenwidth (integer) Sets the screen width as seen by JavaScript, i.e. the window.screen.width value. Default is 1280.

  • screenheight (integer) Sets the screen height as seen by JavaScript, i.e. the window.screen.height value. Default is 1024.

  • scriptevents [add|del|set] [$events ...] After a page is fetched, JavaScript events are triggered, and the appropriate event handler(s) called, which may add additional links to the result set of <urlinfo links>. This in effect simulates the user traversing a page and generating mouse-over, etc. events, which may collect some links that a "static" fetch and one-time run of the page wouldn't, especially for certain JavaScript-navigated sites.

    The scriptevents setting controls which events are generated. Its argument(s) are a list of event names to trigger, from the following (default) list: Abort, AfterPrint, BeforePrint, BeforeUnload, Blur, Change, Click, Close, DblClick, DragDrop, Error, Focus, Help, KeyDown, KeyPress, KeyUp, Load, MouseDown, MouseMove, MouseOut, MouseOver, MouseUp, Move, Reset, Resize, Scroll, Select, Submit, Unload. The keyword all means all events. Events may also be named by handler, i.e. with the prefix on. If the first value of the first argument is add, the given events are added to the trigger list; if it is del, the events are deleted; if set (the default), the trigger list is cleared and set to the event list. Returns previous event list. Added in version 4.01.1023500000 20020607.

  • scriptlinks (boolean) If true (default), all javascript: protocol links found on a page are executed (i.e. as if the user clicked on them). This may result in additional links being generated. (Such links often refer to page-specific functions, and thus must be run in the context of their referring page, not later on as an argument to <fetch>.) Note that the javascript protocol must also be enabled via the protocols setting. Returns previous setting. Added in version 4.01.1023500000 20020607.

  • scriptrealtimers (boolean) Whether to run JavaScript timers (as set by setInterval() and setTimeout()) in real time. This is off by default, so that no real time is wasted waiting for the next timer (timers are still fired in proper order however). Returns previous value. Added in version 4.03.1050609000 20030417. See also scriptmaxtimer (here).

  • scripturldecode (boolean) Whether to URL-decode javascript:-protocol links before execution. On by default. Note that all links encountered in HTML are HTML-decoded first regardless. Returns previous value. Added in version 4.01.1024300000 20020617.

  • scriptvaryevents (boolean) If true (default), after fetching a page, the options, checkboxes and radio buttons on a form are rotated through their values: each change generates additional JavaScript events, which may call JavaScript event handler(s), which may add additional links to the result set of <urlinfo links>. Note that this is in addition to the one-time call of event handlers controlled by scriptevents. Returns previous setting. Added in version 4.01.1025600000 20020702.

See also getscripts and protocols in the Page Fetching section (here); scriptmem, scripttimeout and scriptmaxtimer in the Resource Limits section (here); and tracescript and scriptmsgs in the Informational/Trace section (here).


Copyright © Thunderstone Software     Last updated: Apr 15 2024
Copyright © 2024 Thunderstone Software LLC. All rights reserved.