Skip to content

Commit

Permalink
Revert "Addded page_labe to plugin.info also changed docs"
Browse files Browse the repository at this point in the history
This reverts commit ada7afb.
  • Loading branch information
GEJ1 committed Sep 27, 2020
1 parent ada7afb commit 49f68b7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
7 changes: 5 additions & 2 deletions docs/plugins/jspsych-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

This plugin is for showing instructions to the subject. It allows subjects to navigate through multiple pages of instructions at their own pace, recording how long the subject spends on each page. Navigation can be done using the mouse or keyboard. Subjects can be allowed to navigate forwards and backwards through pages, if desired.

## Parameters

Parameters with a default value of *undefined* must be specified. Other parameters can be left unspecified if the default value is acceptable.

Parameter | Type | Default Value | Description
----------|------|---------------|------------
pages | array | *undefined* | Each element of the array is the content for a single page. Each page should be an HTML-formatted string.
Expand All @@ -12,8 +16,7 @@ allow_keys | boolean | true | If true, the subject can use keyboard keys to navi
show_clickable_nav | boolean | false | If true, then a `Previous` and `Next` button will be displayed beneath the instructions. Subjects can click the buttons to navigate.
button_label_previous | string | 'Previous' | The text that appears on the button to go backwards.
button_label_next | string | 'Next' | The text that appears on the button to go forwards.
show_page_number | boolean | false | If true, and clickable navigation is enabled, then Page x/y will be shown between the nav buttons.
page_label | string | 'Page' | The text that appears before x/y pages displayed with show_page_number.


## Data Generated

Expand Down
8 changes: 1 addition & 7 deletions plugins/jspsych-instructions.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,6 @@ jsPsych.plugins.instructions = (function() {
default: false,
description: 'If true, and clickable navigation is enabled, then Page x/y will be shown between the nav buttons.'
},
page_label: {
type: jsPsych.plugins.parameterType.STRING,
pretty_name: 'Page label',
default: 'Page',
description: 'The text before x/y (current/total) pages displayed with show_page_number'
},
button_label_previous: {
type: jsPsych.plugins.parameterType.STRING,
pretty_name: 'Button label previous',
Expand Down Expand Up @@ -110,7 +104,7 @@ jsPsych.plugins.instructions = (function() {
var pagenum_display = "";
if(trial.show_page_number) {
pagenum_display = "<span style='margin: 0 1em;' class='"+
"jspsych-instructions-pagenum'>"+ trial.page_label + ' ' +(current_page+1)+"/"+trial.pages.length+"</span>";
"jspsych-instructions-pagenum'>Page "+(current_page+1)+"/"+trial.pages.length+"</span>";
}

if (trial.show_clickable_nav) {
Expand Down

0 comments on commit 49f68b7

Please sign in to comment.