1. Home
  2. Knowledge Base
  3. Ghostlab: Configuration Reference
  4. Application Preferences

Application Preferences

Redirection Service

The redirection service allows you to set up permanent bookmarks that point to the computer that is currently running Ghostlab. This is helpful in case you are sharing test devices in a team and want to have a single bookmark on them that always points to the computer of the developer currently using the devices with Ghostlab.

Set up a redirection bookmark at me.vanamco.com and add it to Ghostlab via the provided link or by pasting the token into the service access token field. When redirection service is enabled, Ghostlab will update the bookmark whenever it starts the server and display the redirection URL (e.g. http://302.pm/ob6NZR) as the server URL and 2D barcode.

Client behavior

By default, Ghostlab rewrites navigation URLs (for example, a URL in an href attribute) so that any link you follow on a website will be loaded via Ghostlab. If in some environment, you do not want this to happen, you can turn it off.

Similarly to navigation URLs, Ghostlab also rewrites all URLs it encounters in the JavaScript code of a site. Again, if you are in a context where you do not want this to happen, you can turn it off here.

Quickfills and automatic form fills

Quickfills and automatic form filling make it easy to fill out forms across multiple devices in no time.

Quickfills are JavaScript functions that return a value and that are executed when a certain trigger string is entered into a text input field. For example, if you enter $n into a text field on a website, a random number will be inserted into this form field (across all clients). You can customize the trigger string and the JavaScript function of any existing quickfill or simply add new quickfills that suit your needs. Note that since version 2.1.3, we’re handing over the target element to the function – this means that you’ll have a reference to the form field where the Quickfill was used. 

Automatic form filling goes one step further. Whenever you are inside a form (so any form field has focus), and you press the automatic form fill shortcut, the entire form will be filled out according to the rules defined by the automatic form filling sections. Rules are basically CSS selectors matching classes of form fields that are paired with JavaScript functions that generate a return value to be entered into the fields matching the CSS selectors. You can customize automatic form filling entirely.

Advanced Settings

 

Remote JavaScript debugging

When you are remotely debugging JavaScript with the build-in inspector, Ghostlab rewrites all JavaScript so as to make it debuggable. This results in a performance penalty. You can blacklist scripts that will never be rewritten to make them debuggable to gain performance – by default, Ghostlab does not make popular JavaScript libraries debuggable to improve performance. Add any script you don’t want debuggable to gain performance.

The whitelisting field allows you to specify scripts that you must have debuggable, even if they would be excluded by the blacklist. E.g. if you want to exclude all jquery-Related scripts with the blacklist entry jquery, but want to have one specific jQuery plugin (e.g. jquery-myfancy.js) to be debuggable, add the entry jquery-myfancy.js to the whitelist.

Networking and Security

You can protect your Ghostlab server by requiring any client connecting to it a username and password. This option can be changed while the server is running.

When Ghostlab starts the server, it will bind to a specific network IP, and it will need to open three ports for communication (one for HTTP requests, one for websockets, and one for the inspector). You can either choose to let Ghostlab select IP address and ports automatically, or you can set whatever values you usually work with. Also, you can limit the number of outgoing HTTP connections Ghostlab performs on behalf of the clients it is serving. Note that you can’t change IP and port settings while the server is running.

Proxy Settings

If you are in a network that requires a proxy to connect to the Internet, Ghostlab can handle it. By default, Ghostlab checks your system proxy settings and uses them to connect to the Internet. If you don’t have system-wide proxy settings (e.g. they are only configured in a browser), you can also enter the Proxy configuration manually. Of course, you can also force Ghostlab not to use a proxy at all, even if one is configured in your system.

Client scrolling behavior

 

In case you feel the way clients scroll isn’t as you’d expect, you can customize the scrolling behavior in two variants: you can either tell Ghostlab to synchronize visible elements, or to propagate scrolling offsets.

If you synchronize visible elements, Ghostlab will try to scroll on all clients such that the same visible element is in view. You can finetune this setting by specifying in which area Ghostlab should search for visible elements. Note that this setting does not work well if your page loads its content elements very lazily, i.e. if elements are only loaded as you scroll down. If this is the case, elements already visible on the client where the scrolling is performed will not yet be present on the other clients, and can thus not be scrolled to.

Example: if you select Vertical center, the HTML element closest to the vertical center of your screen will be used as a reference. Clients then try to scroll in a manner such that the reference element is in the center of their respective screens. If you choose Bottom, the element of reference will be picked from the bottom part of your screen, and clients will try to scroll in a manner such that the element of reference is at the bottom of their respective screens.

If you propagate scrolling offsets, Ghostlab simply propagates directional scrolling events to all clients, regardless of the currently visible areas.

 

Update settings

Ghostlab has the ability to check for updates on its own, and download updates if they are encountered. Make sure to automatically check for updates if you want to always have the latest bugfixes and new features.

Modify default site

Whenever a new site is added, its initial settings are based on the default site settings. By allowing modification of the default site, an additional tab will show that allows you to edit the default site settings that apply for new sites. At any time, you can reset the default site settings to the original values that are shipped with Ghostlab.

Was this article helpful?

Related Articles