Skip to content

custom_javascript

Eliran Wong edited this page Feb 17, 2021 · 2 revisions

Custom Javascript

UBA supports both custom css and custom javascript.

For custom css, read https://github.com/eliranwong/UniqueBible/wiki/custom_css.

This page describes custom javascript.

This feature is created for module creator to build custom their module module with custom javascript actions.

Which version supports this feature?

This feature is available from version 21.38.

After you upgraded to version 21.38 or install a version later than 21.38, you should have the following file in your UniqueBible.app installation folder:

[unique_bible_app_folder] > htmlResources > js > custom.js

From version 21.38, this file is automatically created for you if you don't have one in place.

Initially, it is an empty file. You need to edit this file and save it. To make the changes effective, you need to restart UniqueBible.app.

This feature is designed for developer. If you are not sure what it is about, please do not edit the file custom.js

Reminder

Please check UBA built-in javascript functions in common.js, default.js and dark.js in the same folder.

Please note that custom.js takes higher priority to be executed. That mean if you name a function as the same name of a UBA built-in javascript function, you custom.js can block built-in UBA features.

e.g. if you put the following function in custom.js, it blocks the verse number single-click action built for UBA.

function luV(v) { alert("Default verse number single-click action is blocked!"); }

Therefore, make sure you know what you do with this custom.js file.

Clone this wiki locally