Plugins
While Pentadactyl offers no dearth of features on its own, it can't be, nor does it aim to be, everything to everyone. For that reason, we provide a plugin mechanism much akin to Firefox's add-on system. In addition to the several official and semi-official plugins listed below, plugins by our users are hosted at our Google Code project, and many more can be found elsewhere on the web.
- Browse our official plugins below.
Install these plugins by copying them to the ~/.pentadactyl/plugins/ directory (or %USERPROFILE%\pentadactyl\plugins on Windows). If you've written your own plugins which you think others might find useful, please feel free to submit them.
Themes and colors
In addition to the standard plugin system, Pentadactyl
may be rethemed in scrupulous detail, and provides
pluggable
color schemes.
You can install them by copying them to the ~/.pentadactyl/colors/
directory (or %USERPROFILE%\pentadactyl\colors on
Windows), and enable them with the :colorscheme
command.
Please feel free to
submit your own, as well.
Official plugins
The following plugins are written largely by the main
developers of Pentadactyl. While these plugins are
officially supported, they aren't likely to be useful to
everyone, so we've chosen to provide them separately,
rather than unduly clutter the Pentadactyl core. They
can be downloaded and installed like any other plugins,
after which the following help text will be available
via the standard :help
command.
Unfortunately, Mozilla policies prevent us from
providing an automatic update system, so check back
here or watch the news feed for new versions.
Plugins may also be accessed via the web site's Mercurial repository in the htdocs/plugins directory.
Contents
Aardvark page editor
This plugin is a Pentadactyl port of the Aardvark Firefox plugin and bookmarklet. The code is moderately horrendous, but it generally works.
Browser Consistency Improvements
This plugin provides various browser consistency improvements, including:
- Middle clicking on a form submit button opens the resulting page in a new tab.
- Pressing <C-Return> while a textarea or select element is focused submits the form.
Curl command-line generator
This plugin provides a means to generate a curl(1) command-line from the data in a given form.
Generates a curl command-line from the data in the selected form. The command includes the data from each form element, along with the current User-Agent string and the cookies for the current page.
Focus fixer
This plugin is what amounts to a massive hack to restore focus to Firefox when it's been grabbed by a plugin. This plugin, which only works on X11 systems, functions by grabbing a key via an external library, and faking a click on the Firefox window when that key is pressed. Prior to Firefox 4, it was possible to restore the focus with a relatively simple function call. Currently, however, it seems that focus is restored only when the main Firefox window is clicked. This means that, in order for this plugin to function properly, the bottom-right of the Firefox window must be unobscured, or the window that obscures it will receive a click event instead.
A key that may be pressed to wrest focus from plugins. Please note that although key modifiers are specified as in key-notation, the key name itself is an X11 keysym name, as may be gleaned from the output of the xev program.
Flash Blocker
This plugin provides the same features as the ever popular FlashBlock Firefox add-on. Place holders are substituted for flash animations and embedded videos. When clicked, the original embedded content is restored. Additionally, this plugin provides options to control which sites can play animations without restrictions and triggers to toggle the playing of animations on the current page.
Controls the blocking of flash animations. When true, place holders are substituted for flash animations on untrusted sites.
Controls which sites may play flash animations without user intervention. See :mkpentadactylrc.
Toggles the playing of all animations on the current page. If any flash animations are currently blocked, all may begin playing. Otherwise, all animations are stopped.
HTTP header info
Adds request and response headers to the :pageinfo command, with the keys h and H respectively. See also 'pageinfo'.
jQuery integration
This plugin provides basic jQuery integration. With it enabled, jQuery's $ function is available for any web page, with the full power of jQuery. It also provides $w, $d, and $b objects which refer to the the content window, document, and body respectively.
JavaScript completion enhancements
This plugin provides advanced completion functions for DOM functions, eval, and some other special functions. For instance, :js content.document.getElementById("<Tab> should provide you with a list of all element IDs present on the current web page. Many other DOM methods are provided, along with their namespaced variants.
NoScript integration
This plugin provides tight integration with the NoScript add-on. In addition to commands and options to control the behavior of NoScript, this plugin also provides integration with both the Pentadactyl and Firefox sanitization systems sorely lacking in the add-on itself. Namely, when data for a domain is purged, all of its associated NoScript permissions are purged as well, and temporary permissions are purged along with session data.
Note: As most options provided by this script directly alter NoScript preferences, which are persistent, their values are automatically preserved across restarts.When on, all sites are allowed to execute scripts and load plugins. When off, only specifically allowed sites may do so.
The set of permissions forbidden to untrusted sites.
- bookmarklet
- Forbid bookmarklets
- collapse
- Collapse forbidden objects
- flash
- Block Adobe® Flash® animations
- fonts
- Forbid remote font loading
- frame
- Block foreign <frame> elements
- iframe
- Block foreign <iframe> elements
- java
- Block Java™ applets
- media
- Block <audio> and <video> elements
- placeholder
- Replace forbidden objects with a placeholder
- plugins
- Forbid other plugins
- refresh
- Block <meta> page directions
- silverlight
- Block Microsoft® Silverlight™ objects
- trusted
- Block media and plugins even on trusted sites
- webbug
- Block “web bug” tracking images
- xslt
- Forbid XSLT stylesheets
See also 'noscript-objects'.
The set of items to show in the main completion list and NoScript menu.
- address
- Show the full address (http://www.google.com)
- base
- Show the base domain (google.com)
- full
- Show the full domain (www.google.com)
The list of objects which allowed to display. See also 'noscript-forbid'.
The list of sites which are permanently allowed to execute scripts.
The list of sites which are temporarily allowed to execute scripts. The value is not preserved across application restarts.
The list of untrusted sites which are not allowed to activate, nor are listed in the main completion lists or NoScript menu.
Tab options
Adds extended tab options, including relative placement of new tabs and more sensible focus changes after tab closure.
Tab closure options, in order of precedence. The first item for which a valid tab exists is used.
- left
- Select the tab to the left when closing
- opener
- Select the tab’s opener, if available
- previous
- Select the previously selected tab
- right
- Select the tab to the right when closing
New tab placement options. The keys in the stringmap refer to the ways the tab was opened, while the values define where such tabs are placed. The following keys are applicable:
- external
- Tabs opened from an external application
- link
- Tabs opened by clicking links and the like
- orphan
- Tabs opened by any other means
As are the following values:
- end
- Open new tabs at the end of the tab bar
- groupleft
- Open tabs to the left of the current group
- groupright
- Open tabs to the right of the current group
- left
- Open new tabs to the left of the current tab
- right
- Open new tabs to the right of the current tab
- start
- Open new tabs at the start of the tab bar
User Agent Switcher
Ths plugin allows you to switch the browser's reported user-agent to a number of preset values.
With zero or one arguments, list the currently defined user-agent values.
With two arguments, defines a new user-agent for use in the 'useragent' option. When 'useragent' is set to [name], the User-Agent value sent to web servers, and the value returned by navigator.userAgent will be [useragent]. Additionally, the following options are available:
- -appcodename
- The value of navigator.appCodeName
- -appname
- The value of navigator.appName
- -appversion
- The value of navigator.appVersion
- -platform
- The value of navigator.platform
- -vendor
- The value of navigator.vendor
- -vendorsub
- The value of navigator.vendorsub
Changes the User-Agent string sent to the web server and returned by navigator.userAgent. If the value is the name of a user-agent defined by :useragent, or one of the predefined values, then the defined value is used. Otherwise, the value itself is used.
XPCOM development
This plugin aids in the development of XPCOM-related code, and in the exploration of extant XPCOM interfaces, classes, and instances. All of the functions herein are exported to the userContext and are thus available from the :javascript command. Each of these functions provides JavaScript completion for its arguments.
This function is the core of the plugin. It wraps XPCOM objects so that their properties are more easily accessible. When {instance} alone is given, the result contains one property for each interface that {instance} implements. Each of those properties, in turn, returns {instance} wrapped in a call to
xpwrapper({instance}, {interface}),which contains only the properties of {instance} specified in {interface}. Additionally, the one-argument form contains the properties all and wrappedJSObject, the former of which returns an object that implements all interfaces provided by the instance, and the latter of which, when applicable, is the raw JavaScript object that backs the XPCOM instance.
When {string} is provided rather than an XPCOM instance, the returned object contains all of the properties specified by the interface with the given name, each with an undefined value.
When given an XPCOM instance as its first argument, the result is exactly the same as the one argument form of xpwrapper. When given a string, returns the xpwrapper for an instance of the provided XPCOM contract ID.
Presents, for each installed interface, a property for each class that provides that interface. The properties on both levels are lazily instantiated, so iterating over the values of either level is not a good idea.
An object containing an xpwrapper wrapped service for each contract ID in Components.classes.