Configurations

Here you will be able to find various configurations that can be done for webReader. If you cannot find what you're looking for, please contact us at moc.rekaepsdaer@troppus

Disable/Enable tools Examples of how to disable/enable tools in the toolbar
Change the Mobile UI's vertical placement Examples of changing the Mobile UI's vertical placement
Enabling a language/voice cookie Example of how to add a voice/language cookie
Display a confirm message Example of how to display a confirm message before starting playback

Below is an image of the webReader button and the toolbar, with all available tools enabled. Not all tools are available by default, and the toolbar can be customized to only provide the tools you find suitable.

The numbers under the toolbar correspond to the numbers in the table under "1. Disabling/enabling a tool in the toolpanel".

The webReader button and toolbar

1. Disabling/enabling a tool in the toolpanel


Nr Tool Enabled by default Tool description
1 settings Yes Personalize reading speed, highlighting colors, and more.
2 voicesettings No* Change the reading language or voice. Useful if you provide pages that contain more than one language.
*Unless you use Blackboard, Moodle, D2L or Canvas
3 readhover Yes Hover over a paragraph of text and it will read aloud automatically.
4 enlarge Yes Text being read is displayed at the bottom of the page in large font size.
5 textmode Yes View a clutter-free version of the web page with text in your preferred font, size and colors as it is read aloud and highlighted.
6 pagemask Yes Horizontal bar that can be moved along with the reading to bring out the lines being read by shading the rest of the screen.
7 download Yes Download the text as an mp3 file that you can listen to offline.
8 help Yes Clear instructions on how to use each feature.
9 dictionary Depends* Select a word and find its definition in the dictionary. See list of available languages here. *The look up tool button is automatically hidden from the Toolbar if none of your languages are supported by the Look up tool.
10 translation Yes Translate a selected text to a number of languages and have the text read in the target language. See list of available languages here.

Through config object

Disabling a tool for a panel can be done through a configuration in the UI. Either through the ReadSpeaker.pub.Config.js file, rsConf or using rspkr.cfg.item().
To disable a tool, simply set the ui.tools.[feature-name] to false in the configuration. In order for this to work it has to be set before the toolspanel has loaded.

To enable a tool, simply set ui.tools.[feature-name] to true in the configuration.

The name is taken from the data-rs-tool attribute taken from the rsbtn_tool object.

Below is an example where the translation tool is disabled:

<script type="text/javascript"> 
<!-- 
    window.rsConf = {ui: {tools: {translation: false}}}; 
//--> 
</script>

Through script parameter

Another way of disabling specific tools is to do it from the script url. The disable parameter accepts a (comma separated) string as value. The list of tools is the same as when doing this through the rsConf object.

To enable a tool, instead use the enable parameter.

Below is an example where the translation and lookup tool is disabled:

<script src="../webReader.js?pids=wr&disable=translation,lookup">

Disabling all tools

If you want to disable tools altogether you can do so by adding the parameter notools=1 in the script url.

Example:

<script src="../webReader.js?pids=wr&notools=1">

Disable skip-buttons

You can disable the skip-buttons in the player by adding the following parameter to the end of the webReader script: &disable=skipbuttons

2. Mobile UI - Vertical Placement

The mobile toolbar's vertical placement can be altered by adding the config parameter ui.mobileVertPos. The placement can be anchored at the top or at the bottom. By default it's set to bottom, with a 40 pixel offset.

Example:

<script type="text/javascript"> <!-- 
    window.rsConf = { ui: { mobileVertPos: 'top=100' }}; 
//--> 
</script>

If you wish for the language selected in the voice settings tool to be stored in a cookie, it can be enabled with general.saveLangVoice. This way the voice or language will not be changed to default when changing the page.

A use for this can be if the user needs to be able to choose between a female and a male voice.

Example:

<script type="text/javascript">
<!-- 
    window.rsConf = { general: { saveLangVoice: true }}; 
//--> 
</script>

4. Display confirm message before starting playback

When set, the user will need to read and confirm a message before the playback can start on first click. If the user clicks cancel the playback will not start, no cookies will be set and no core scripts will load.

Enabling this is done by simply setting the message that should be displayed to the user.

Example:

<script type="text/javascript">
<!-- 
    window.rsConf = { general: { confirmPolicy: "Using the Listen button service sends a request to an external service to read out the content of this page."}}; 
//--> 
</script>