Skip to content

Extensibility JavaScript

Mark Vincent edited this page May 24, 2019 · 2 revisions

ASB Logo

This document is designed to explain the concepts of using external JavaScript with an Advanced Sidebox addon module. For further details, view the entire list of extensibility documents: Extensibility Docs

Using JavaScript

In order to use external JavaScript on pages on which your module's side boxes display on, you simply need to set the scripts property in your module's info function:

function asb_javascript_example_info()
{
	return array(
		'title' => 'Javascript Example',
		[...]
		'scripts' => array(
			'javascript_example',
		),
	);
}

The script must exist and be placed in ./jscripts/asb. The base name given in the info function will have the .js extension appended to the actual file.

The above module would use the external JavaScript to alert the user inanely. For a complete example, look here: Simple Javascript Example

Next Topic

Using Settings Peekers