IBT Bible Browser Service (version 1.1)
This service allows your website to display specific Bible passages in any of the languages available on IBT's website, with various customizable parameters to refine the result. Included with the text are powerful study features such as search, interlinear original language, print and audio playback, among other features.
Example Usage
<script src="https://ibt.org.ru/modules/custom/ibt/dist/bibleBrowserParent.js" defer></script><iframe src="https://ibt.org.ru/bible-browser?texts=UZV&locale=text&css=%23root{--min-height:800px;}" width="100%"></iframe>
Iframe Source URL Query Parameters
texts (required)
- Description: Specifies the text to be shown in each panel of the Bible Browser as a list of text identifier codes, separated by tilde. A text's identifier code can be found in the upper left in the 'About this text' information (ie. view a text in IBT's Bible Browser and activate the 'About this text' link, and the code is, for example, 'ADG'). The actual number of panels displayed will be limited by device width.
- Example:
TEXTA~TEXTB(show TEXTA in one panel and TEXTB in a second panel) - Validator:
/^[A-Za-z0-9_]+(~[A-Za-z0-9_]+)*$/ - Default: None (at least one valid text code is required)
tabs
- Description: Specify the tabs to be shown in each Bible Browser panel, otherwise tabs for all texts are shown in all panels.
- Example:
TEXTA,TEXTB~TEXTA,TEXTC(show TEXTA and TEXTB tabs in the first panel and TEXTA and TEXTC tabs in the second panel. - Validator:
/^[A-Za-z0-9_]+([~,][A-Za-z0-9_]+)*$/ - Default: Empty (show tabs for all texts in all panels)
verse
- Description: Specify the Bible verse to display, otherwise the first verse of the first text is displayed.
- Example:
Gen.1.1or~Gen.1.1(the tilde allows fallback to an existing verse if the given verse is not found in the text) - Validator:
/^~?[\w\d]+(\.\d+(\.\d+(\.\d+)?)?)?$/ - Default: Empty (show first verse of the first text)
key
- Description: Specify a key to the non-Bible text to look up, such as a glossary entry or the name of a chapter, otherwise the first entry in the text is used.
- Example:
ESKİ BAALANTI/Dünnä kurulması - Validator:
/^.{1,512}$/ - Default: Empty (show first entry of the text)
audio
- Description: An audio module code to start the audio player automatically, or empty for no auto-play.
- Example:
UZV - Validator:
/^[A-Za-z0-9_]+$/ - Default: Empty (no auto-play)
locale
- Description: The locale to choose for the user interface. See validator below for available locale codes, or use text to choose the same locale as the first text (if that text's own locale is in the list below, otherwise the value of context_locale is used.
- Example:
uz-Cyrl - Validator:
/^(text|en|ru|crh-Cyrl|fa|kk|ko|kum|ky\-Arab|ky\-Cyrl|ru\-CA|sl|tk\-Latn|tt\-Cyrl|uz\-Cyrl|uz\-Latn)$/ - Default: Empty (same as context_locale)
context_locale
- Description: Context locale determines the default locale as well as the Strong's number tools' locale. See validator below for available locale codes. Or leave empty to default to the iframe source URL’s domain language which for ibt.org.ru is Russian and for ibtrussia.org is English.
- Example:
ru - Validator:
/^(en|ru)$/ - Default: Empty (URL domain default locale)
g
- Description: A two-digit hexadecimal integer for text options. Each 1 in the binary number turns off one of these text features (from least significant to most significant bit): headings, footnotes, cross references, glossary links, words of Christ in red, verse numbers, Hebrew vowel points, Hebrew cantillation, Strongs number links, morphology links.
- Example:
3F - Validator:
/^[A-Fa-f0-9]{1,2}$/ - Default:
0 (all text features are enabled)
chooser (boolean)
- Description: If set to 1 the Bible passage chooser widget will be shown on wide displays.
- Validator:
/^(0|1)$/ - Default:
1 (show the chooser)
history (boolean)
- Description: If set to 1 then history selection buttons will be shown.
- Validator:
/^(0|1)$/ - Default:
0 (hide the history buttons)
comp (boolean)
- Description: If set to 1 then tabs for any companion texts, such as glossaries, will be shown.
- Validator:
/^(0|1)$/ - Default:
1 (show companion tabs)
strongs (boolean)
- Description: If set to 1 then a tab with a Strong’s numbers tagged text will be shown.
- Validator:
/^(0|1)$/ - Default:
1 (show Strong's text tab)
interlinear (boolean)
- Description: If set to 1 then a tab for displaying interlinear text will be shown.
- Validator:
/^(0|1)$/ - Default:
1 (show interlinear text tab)
tabcntl (boolean)
- Description: If set to 1 a tab for adding or removing texts will be shown.
- Validator:
/^(0|1)$/ - Default:
1 (show add/remove text tab)
css
- Description: Apply CSS to the Bible Browser. Styles may only be applied within the id="root" element. Certain characters must be percent escaped in order for the URL to be valid. Therefore, to select the root element, use %23rootfor example. Bible Browser CSS implements the following CSS variables, which may be set as desired: --min-height, --input-height, --color-primary, --color-secondary, --color-secondary2, --color-secondary3, --bg-interface-dark, --bg-interface-light, --bg-bp6-light, --bg-interface-selection, --bg-disabled, --bg-text-light, --bg-text-dark, --bg-text-pinned, --border-light, --border-dark, --font-heading-color, --font-heading, --font-text, --shadow, --bp6-box-shadow.
- Example:
%23root {--color-primary:%23462476;--color-secondary:%23a8a78f;} - Validator:
sanitizeIframeCSS - Default: Empty
storeid
- Description: A user's customized Bible Browser settings may be stored on their device and persisted between sessions. The storeid controls how, or if, this will be done. Each storeid value is associated with a particular collection of user settings. Any storeid may be prefixed with before: (to load the user's local storage settings before any parameters set by the URL so that URL settings will override local storage) or after: (to load the user's local storage settings after URL parameter settings so that user local settings will override URL settings) or set to none to disable persistent user settings altogether.
- Example:
before:mycodev1 - Validator:
/^(before:|after:)?[A-z0-9]+([~,][A-z0-9]+)*$/ - Default:
none
Controlling iframe height
Bible Browser minimum height is set using the --min-height CSS variable (which is 800px by default). However actual height will sometimes be greater than this depending upon the text content and mode. Normally, iframe height will be auto-adjusted to match content height, removing the need for an iframe scrollbar. However when the embedded iframe must remain at a fixed height on your web-page, then you must add the fixed-height class to that iframe and set the --min-height css parameter in the URL to your desired height, otherwise the height of the iframe on your page will change as it is being used.