Extension development

Contents

Outline

Extensions are developed using JavaScript. The scripting used is very similar to the Greasemonkey script specifications so if you have developed Greasemonkey scripts in the past you should find the specifications very easy to understand.

File formatting

Extensions are made using one JavaScript source file. The encoding used is UTF-8. Please set the name as *.slex.js. When a *.slex.js link is opened in the application, an installation dialog is displayed.

URL not to be executed. Wild cards possible. Regular expressions not possible.

o

o

@android-version <Version number>

Set the Android version used when operating this extension. It is not necessary to set this if operations are performed the same regardless of the Android version.

o

o

@version <Version number>

Version number of this extension.

x

x

@history <Version number> <Description>

Update history of each version in English. Please input in descending order from the latest version when setting multiple versions.

o

o

@history:ja <Version number> <Description>

Update history of each version in Japanese. Please input in descending order from the latest version when setting multiple versions.

o

o

@require <Function name>

Sets the script functions to be enabled. This differs with the @require of Greasemonkey so please be careful.

o

o

@origin <URL>

The original URL for downloading the extension file. It is not required to set this. This will be treated as the ID of extension files not being distributed in the Sleipnir Mobile Extensions Center.

o

x

@gallery-id <ID>

This shows the ID used in the Extensions Gallery. This meta data is automatically added in response to the script posted on the site. Please ignore it when this meta data is attached to the installed script on a site not distributed.

o

x

List of script functions

Script function name

Details

api

Makes using Extension API possible. Please do not use when the site to be executed can not be trusted.