Whether to update <title> elements of content documents based on metadata in the package document.
Whether to update
elements of content documents based on metadata in the package document.
<p>If there is one or more
<a href="https://www.w3.org/publishing/epub3/epub-packages.html#sec-opf-dctitle" class="external-link" target="_blank"><code>dc:title</code></a> element, use
the value of the first one to create a <code><title></code> element in all content documents (overwriting
any existing elements with the same name).</p>
<p>If the “Metadata” option is used to inject new metadata into the EPUB, the resulting metadata is
used to generate the attributes.</p>
</div>
</div>
<div class="synopsis-option-data-type">
<b>Possible values</b>: <code>true</code> or <code>false</code>
</div>
<div class="synopsis-option-default">
<b>Default value</b>: <code>false</code>
</div>
</li>
<li class="synopsis-option details-on">
<div class="toggle-details"></div>
<div class="synopsis-option-name">identifier'> elements based on EPUB metadata</div>
<div class="synopsis-option-desc">
<div class="shortdesc">Whether to update <meta name='dc:identifier'> elements of content documents based on metadata in the package document.
</div>
<div class="longdesc">Whether to update <meta name="dc:identifier"> elements of content documents based on metadata in the package document.
<p>Use the primary identifier (provided by the
<a href="https://www.w3.org/publishing/epub3/epub-packages.html#sec-opf-dcidentifier" class="external-link" target="_blank"><code>dc:identifier</code></a>
element identified by the
<a href="https://www.w3.org/publishing/epub3/epub-packages.html#attrdef-package-unique-identifier" class="external-link" target="_blank"><code>unique-identifier</code></a>
attribute) to create a <code><meta name='dc:identifier'></code> element in all content documents
(overwriting any existing elements with the same name).</p>
<p>If the “Metadata” option is used to inject new metadata into the EPUB, the resulting metadata is
used to generate the attributes.</p>
</div>
</div>
<div class="synopsis-option-data-type">
<b>Possible values</b>: <code>true</code> or <code>false</code>
</div>
<div class="synopsis-option-default">
<b>Default value</b>: <code>false</code>
</div>
</li>
<li class="synopsis-option details-on">
<div class="toggle-details"></div>
<div class="synopsis-option-name">Update 'lang' attributes based on metadata</div>
<div class="synopsis-option-desc">
<div class="shortdesc">Whether to update 'lang' and 'xml:lang' attributes of content documents based on metadata in the package document.
</div>
<div class="longdesc">Whether to update 'lang' and 'xml:lang' attributes of content documents based on metadata in the package document.
<p>If there is exactly one
<a href="https://www.w3.org/publishing/epub3/epub-packages.html#sec-opf-dclanguage" class="external-link" target="_blank"><code>dc:language</code></a> element,
use its value to create <code>xml:lang</code> and <code>lang</code> attributes on the root elements of all content
documents (overwriting any existing attributes)</p>
<p>If the “Metadata” option is used to inject new metadata into the EPUB, the resulting metadata is
used to generate the attributes.</p>
</div>
</div>
<div class="synopsis-option-data-type">
<b>Possible values</b>: <code>true</code> or <code>false</code>
</div>
<div class="synopsis-option-default">
<b>Default value</b>: <code>false</code>
</div>
</li>
<li class="synopsis-option details-on">
<div class="toggle-details"></div>
<div class="synopsis-option-name">Perform sentence detection</div>
<div class="synopsis-option-desc">
<div class="shortdesc">Whether to add markup (span elements) for sentences.
</div>
<div class="longdesc">Whether to add markup (span elements) for sentences.
<p>This setting has no effect when text-to-speech is also enabled. In that case sentences are always
marked up.</p>
</div>
</div>
<div class="synopsis-option-data-type">
<b>Possible values</b>: <code>true</code> or <code>false</code>
</div>
<div class="synopsis-option-default">
<b>Default value</b>: <code>false</code>
</div>
</li>
<li class="synopsis-option details-on">
<div class="toggle-details"></div>
<div class="synopsis-option-name">Sentence class</div>
<div class="synopsis-option-desc">
<div class="shortdesc">Class attribute to mark sentences with.
</div>
<div class="longdesc">Class attribute to mark sentences with.
<p>When sentence detection is enabled, this option may be used to add a class attribute to the <code>span</code>
elements that represent the sentences.</p>
</div>
</div>
<div class="synopsis-option-data-type">
<b>Possible values</b>: Any <var><string></var>
</div>
<div class="synopsis-option-default">
<b>Default value</b>: <code></code>
</div>
</li>
<li class="synopsis-option details-on">
<div class="toggle-details"></div>
<div class="synopsis-option-name">Lexicons</div>
<div class="synopsis-option-desc">
<div class="shortdesc">A list of PLS lexicons to take into account.
</div>
<div class="longdesc">A list of PLS lexicons to take into account.
<p>Must be a space separated list of URIs, absolute or relative to the input.</p>
<p>Lexicons can also be attached to the source document, using a <a href="http://kb.daisy.org/publishing/docs/text-to-speech/pls.html#ex-07" class="external-link" target="_blank">‘link’
element</a>.</p>
<p>PLS lexicons allow you to define custom pronunciations of words. It is
meant to help TTS processors deal with ambiguous abbreviations and
pronunciation of proper names. When a word is defined in a lexicon,
the processor will use the provided pronunciation instead of the
default rendering.</p>
<p>The syntax of a PLS lexicon is defined in <a href="https://www.w3.org/TR/pronunciation-lexicon" class="external-link" target="_blank">Pronunciation Lexicon
Specification (PLS) Version
1.0</a>, extended with
regular expression matching. To enable regular expression matching,
add the “regex” attribute, as follows:</p>
<pre><code class="language-xml"><lexicon xmlns="http://www.w3.org/2005/01/pronunciation-lexicon" version="1.0"
alphabet="ipa" xml:lang="en">
<lexeme regex="true">
<grapheme>([0-9]+)-([0-9]+)</grapheme>
<alias>between $1 and $2</alias>
</lexeme>
</lexicon>
</code></pre>
<p>The regex feature works only with alias-based substitutions. The regex
syntax used is that from <a href="https://www.w3.org/TR/xpath-functions/#regex-syntax" class="external-link" target="_blank">XQuery 1.0 and XPath
2.0</a>.</p>
<p>Whether or not the regex attribute is set to “true”, the grapheme
matching can be made more accurate by specifying the
“positive-lookahead” and “negative-lookahead” attributes:</p>
<pre><code class="language-xml"><lexicon version="1.0" xmlns="http://www.w3.org/2005/01/pronunciation-lexicon"
alphabet="ipa" xml:lang="en">
<lexeme>
<grapheme positive-lookahead="[ ]+is">SB</grapheme>
<alias>somebody</alias>
</lexeme>
<lexeme>
<grapheme>SB</grapheme>
<alias>should be</alias>
</lexeme>
<lexeme xml:lang="fr">
<grapheme positive-lookahead="[ ]+[cC]ity">boston</grapheme>
<phoneme>bɔstøn</phoneme>
</lexeme>
</lexicon>
</code></pre>
<p>Graphemes with “positive-lookahead” will match if the beginning of
what follows matches the “position-lookahead” pattern. Graphemes with
“negative-lookahead” will match if the beginning of what follows does
not match the “negative-lookahead” pattern. The lookaheads are
case-sensitive while the grapheme contents are not.</p>
<p>The lexemes are matched in this order:</p>
<ol>
<li>Graphemes with regex=”false” come first, no matter if there is a lookahead or not;</li>
<li>then come graphemes with regex=”true” and no lookahead;</li>
<li>then graphemes with regex=”true” and one or two lookaheads.</li>
</ol>
<p>Within these categories, lexemes are matched in the same order as they
appear in the lexicons.</p>
</div>
</div>
<div class="synopsis-option-data-type">
<b>Possible values</b>: <var><anyURI></var>
</div>
<div class="synopsis-option-default">
<b>Default value</b>: <code>p:system-property('d:org.daisy.pipeline.tts.default-lexicon')</code>
</div>
</li>
<li class="synopsis-option details-on">
<div class="toggle-details"></div>
<div class="synopsis-option-name">Apply author CSS style sheets</div>
<div class="synopsis-option-desc">
<div class="shortdesc">If this option is enabled, any CSS style sheets attached to the EPUB's content documents for media "embossed" or "speech" will be taken into account.
</div>
<div class="longdesc">If this option is enabled, any CSS style sheets attached to the EPUB's content documents for media "embossed" or "speech" will be taken into account.
<p>The EPUB’s content documents may contain CSS (<a href="https://www.w3.org/TR/CSS2/cascade.html#cascade" class="external-link" target="_blank">author style
sheets</a>) that apply to “embossed” or
“<a href="https://www.w3.org/TR/CSS2/aural.html" class="external-link" target="_blank">speech</a>” media. Style sheets can be associated with an HTML
file in several ways: linked (using an ‘xml-stylesheet’ processing instruction or a ‘link’ element),
embedded (using a ‘style’ element) and/or inlined (using ‘style’ attributes).</p>
<p>Author style sheets take precedence over user style sheets (any CSS provided through the “Style
sheets” option). For instance, if the EPUB already contains the rule <code>p { padding-left: 2; }</code>, and
using this script the rule <code>p#docauthor { padding-left: 4; }</code> is provided, then the <code>padding-left</code>
property will get the value <code>2</code> because that’s what was defined in the EPUB, even though the
provided CSS is more specific.</p>
</div>
</div>
<div class="synopsis-option-data-type">
<b>Possible values</b>: <code>true</code> or <code>false</code>
</div>
<div class="synopsis-option-default">
<b>Default value</b>: <code>false</code>
</div>
</li>
<li class="synopsis-option details-on">
<div class="toggle-details"></div>
<div class="synopsis-option-name">Ensure text content for page numbers</div>
<div class="synopsis-option-desc">
<div class="shortdesc">Whether to fix empty page number elements.
</div>
<div class="longdesc">Whether to fix empty page number elements.
<p>Page number elements (elements with a <code>doc-pagebreak</code> <code>role</code> or <code>pagebreak</code> <code>epub:type</code>) that have
no child text node can be given one. The text can be generated based on</p>
<ul>
<li>the element’s <code>aria-label</code> attribute,</li>
<li>the element’s <code>title</code> attribute, or</li>
<li>the text used by the corresponding page link in the navigation document.</li>
</ul>
<p>These options are tried in the listed order. If none of the attributes exist, and the page is linked
from the navigation document, no text is generated.</p>
</div>
</div>
<div class="synopsis-option-data-type">
<b>Possible values</b>: One of the following:<dl class="choice">
<dt><code>true</code></dt>
<dd>Yes</dd>
<dt><code>false</code></dt>
<dd>No</dd>
<dt><code>hidden</code></dt>
<dd>Yes, but not visible</dd>
</dl>
</div>
<div class="synopsis-option-default">
<b>Default value</b>: <code>false</code>
</div>
</li>
<li class="synopsis-option details-on">
<div class="toggle-details"></div>
<div class="synopsis-option-name">Ensure headings for all sections</div>
<div class="synopsis-option-desc">
<div class="shortdesc">Whether to generate a heading element for sections that don't have one.
</div>
<div class="longdesc">Whether to generate a heading element for sections that don't have one.
<p>For sectioning elements that don’t have a heading element, one can be created. The headings are
generated based on the section element’s <a href="https://www.w3.org/TR/wai-aria/#aria-label" class="external-link" target="_blank"><code>aria-label</code></a>
attribute. If the <code>aria-label</code> attribute is not present, no heading element is generated. When an
<code>aria-label</code> is used to generate a heading, it is replaced with a
<a href="https://www.w3.org/TR/wai-aria/#aria-labelledby" class="external-link" target="_blank"><code>aria-labelledby</code></a> attribute that points to the
new heading. The rank of the generated heading matches the depth of the corresponding TOC item in
the navigation document.</p>
</div>
</div>
<div class="synopsis-option-data-type">
<b>Possible values</b>: <code>true</code> or <code>false</code>
</div>
<div class="synopsis-option-default">
<b>Default value</b>: <code>false</code>
</div>
</li>
<li class="synopsis-option details-on">
<div class="toggle-details"></div>
<div class="synopsis-option-name">Style sheet parameters</div>
<div class="synopsis-option-desc">
<div class="shortdesc">A list of parameters passed to the style sheets.
</div>
<div class="longdesc">A list of parameters passed to the style sheets.
<p>Style sheets, whether they’re user style sheets (specified with the “stylesheet” option) or author
style sheets (associated with the source), may have parameters (Sass variables). The
“stylesheet-parameters” option, which takes a comma-separated list of key-value pairs enclosed in
parenthesis, can be used to set these variables.</p>
<p>For example, if a style sheet uses the Sass variable “foo”:</p>
<pre><code class="language-sass">@if $foo {
/* some style that should only be enabled when "foo" is truthy */
}
</code></pre>
<p>you can control that variable with the following parameters list: <code>(foo:true)</code>.</p>
</div>
</div>
<div class="synopsis-option-data-type">
<b>Possible values</b>: <var><stylesheet-parameters></var>
</div>
<div class="synopsis-option-default">
<b>Default value</b>: <code>()</code>
</div>
</li>
<li class="synopsis-option details-on">
<div class="toggle-details"></div>
<div class="synopsis-option-name">Braille translator query</div>
<div class="synopsis-option-desc">
</div>
<div class="synopsis-option-data-type">
<b>Possible values</b>: A query
<p>The syntax is as follows (described in terms of <a href="https://www.w3.org/TR/CSS21/grammar.html" class="external-link" target="_blank">CSS grammar</a>):</p>
<pre><code>query
: feature*
;
feature
: '(' S* IDENT S* [ ':' S* value ]? ')' S*
;
value
: string | integer | IDENT
;
</code></pre>
</div>
<div class="synopsis-option-default">
<b>Default value</b>: <code>(translator:liblouis)</code>
</div>
</li>
<li class="synopsis-option details-on">
<div class="toggle-details"></div>
<div class="synopsis-option-name">Set default rendition to braille.</div>
<div class="synopsis-option-desc">
Make the generated braille rendition the default rendition.
</div>
<div class="synopsis-option-data-type">
<b>Possible values</b>: <code>true</code> or <code>false</code>
</div>
<div class="synopsis-option-default">
<b>Default value</b>: <code>false</code>
</div>
</li>
<li class="synopsis-option details-on">
<div class="toggle-details"></div>
<div class="synopsis-option-name">Perform text-to-speech</div>
<div class="synopsis-option-desc">
<div class="shortdesc">Whether to use a speech synthesizer to produce media overlays.
</div>
<div class="longdesc">Whether to use a speech synthesizer to produce media overlays.
<p>This will remove any existing media overlays in the EPUB.</p>
</div>
</div>
<div class="synopsis-option-data-type">
<b>Possible values</b>: One of the following:<dl class="choice">
<dt><code>true</code></dt>
<dd>Yes</dd>
<dt><code>false</code></dt>
<dd>No</dd>
<dt><code>default</code></dt>
<dd>If publication has no media overlays yet</dd>
</dl>
</div>
<div class="synopsis-option-default">
<b>Default value</b>: <code>default</code>
</div>
</li>
<li class="synopsis-option details-on">
<div class="toggle-details"></div>
<div class="synopsis-option-name">Style sheets</div>
<div class="synopsis-option-desc">
<div class="shortdesc">A list of CSS/Sass style sheets to take into account.
</div>
<div class="longdesc">A list of CSS/Sass style sheets to take into account.
<p>A list of CSS/Sass style sheets to take into account, both for braille transcription (if a braille
rendition is requested), and for text-to-speech (if text-to-speech is enabled).</p>
<p>Must be a space separated list of URIs, absolute or relative to the input.</p>
<p>All style sheets are applied at once, but the order in which they are specified has an influence on
the <a href="https://www.w3.org/TR/CSS2/cascade.html#cascading-order" class="external-link" target="_blank">cascading order</a>.</p>
<p>If the “Apply author style sheets” option is enabled, <a href="https://www.w3.org/TR/CSS2/cascade.html#cascade" class="external-link" target="_blank">author style
sheets</a> will be taken into account and will take
precedence over any style sheets specified through this option (<a href="https://www.w3.org/TR/CSS2/cascade.html#cascade" class="external-link" target="_blank">user style
sheets</a>).</p>
<p>When generating the braille rendition, style sheets are interpreted according to <a href="http://braillespecs.github.io/braille-css" class="external-link" target="_blank">braille
CSS</a> rules. When performing text-to-speech, they are
interpreted as <a href="https://www.w3.org/TR/CSS2/aural.html" class="external-link" target="_blank">aural CSS</a>.</p>
<p>For info on how to use Sass (Syntactically Awesome StyleSheets) see the <a href="http://sass-lang.com/documentation/file.SASS_REFERENCE.html" class="external-link" target="_blank">Sass
manual</a>.</p>
</div>
</div>
<div class="synopsis-option-data-type">
<b>Possible values</b>: <var><anyURI></var>
</div>
<div class="synopsis-option-default">
<b>Default value</b>: <code></code>
</div>
</li>
<li class="synopsis-option details-on">
<div class="toggle-details"></div>
<div class="synopsis-option-name">Enable TTS log</div>
<div class="synopsis-option-desc">
<div class="shortdesc">Whether or not to make the TTS log available.
</div>
<div class="longdesc">Whether or not to make the TTS log available.
<p>The TTS log contains a great deal of additional information that is not present in the main job log
and that is helpful for troubleshooting. Most of the log entries concern particular chunks of text
of the input document.</p>
<p>The default can be changed using the
<a href="/pipeline/Get-Help/User-Guide/Text-To-Speech#common-settings"><code>org.daisy.pipeline.tts.log</code></a>
property.</p>
</div>
</div>
<div class="synopsis-option-data-type">
<b>Possible values</b>: <code>true</code> or <code>false</code>
</div>
<div class="synopsis-option-default">
<b>Default value</b>: <code>p:system-property('d:org.daisy.pipeline.tts.log')</code>
</div>
</li>
<li class="synopsis-option details-on">
<div class="toggle-details"></div>
<div class="synopsis-option-name">Translate to braille</div>
<div class="synopsis-option-desc">
Whether to produce a braille rendition.
</div>
<div class="synopsis-option-data-type">
<b>Possible values</b>: <code>true</code> or <code>false</code>
</div>
<div class="synopsis-option-default">
<b>Default value</b>: <code>false</code>
</div>
</li>
</ul>
<script type="text/javascript">
var allElements = [];
function showDetailsAndHideAllOther() {
var windowTopBefore = window.pageYOffset;
var topBefore = this.offsetTop;
var i;
for (i = 0; i < allElements.length; i++) {
allElements[i].classList.remove('details-on');
allElements[i].classList.add('details-off');
}
this.classList.remove('details-off');
this.classList.add('details-on');
window.scrollTo(0, windowTopBefore + this.offsetTop - topBefore);
}
var onload = function() {
allElements = allElements.concat(Array.prototype.slice.call(document.getElementsByClassName('synopsis-input'), 0));
allElements = allElements.concat(Array.prototype.slice.call(document.getElementsByClassName('synopsis-report'), 0));
allElements = allElements.concat(Array.prototype.slice.call(document.getElementsByClassName('synopsis-output'), 0));
allElements = allElements.concat(Array.prototype.slice.call(document.getElementsByClassName('synopsis-option'), 0));
var i;
for (i = 0; i < allElements.length; i++) {
allElements[i].classList.remove('details-on');
allElements[i].classList.add('details-off');
allElements[i].addEventListener('click', showDetailsAndHideAllOther);
}
}
if (window.addEventListener) {
window.addEventListener('load', onload);
} else {
window.attachEvent('onload', onload);
}
</script>
</div>
<div class="cli-synopsis hidden">
<pre>Usage: dp2 [GLOBAL_OPTIONS] epub3-to-epub3 [OPTIONS]
Options:</pre>
<table>
<tr>
<td>--metadata <span style="text-transform: uppercase">metadata</span>
</td>
<td>Metadata to be included in the EPUB.
</td>
</tr>
<tr>
<td>--tts-config <span style="text-transform: uppercase">tts-config</span>
</td>
<td>Configuration file for text-to-speech.
</td>
</tr>
<tr>
<td>--source <span style="text-transform: uppercase">source</span>
</td>
<td>The EPUB you want to convert.
</td>
</tr>
<tr>
<td>--update-title-in-content-docs [<span style="text-transform: uppercase">update-title-in-content-docs</span>]</td>
<td>Update <title> elements based on EPUB metadata (default: <span class="synopsis-option-default"><code>false</code></span>)</td>
</tr>
<tr>
<td>--update-identifier-in-content-docs [<span style="text-transform: uppercase">update-identifier-in-content-docs</span>]</td>
<td>identifier'> elements based on EPUB metadata (default: <span class="synopsis-option-default"><code>false</code></span>)</td>
</tr>
<tr>
<td>--update-lang-attributes [<span style="text-transform: uppercase">update-lang-attributes</span>]</td>
<td>Update 'lang' attributes based on metadata (default: <span class="synopsis-option-default"><code>false</code></span>)</td>
</tr>
<tr>
<td>--sentence-detection [<span style="text-transform: uppercase">sentence-detection</span>]</td>
<td>Perform sentence detection (default: <span class="synopsis-option-default"><code>false</code></span>)</td>
</tr>
<tr>
<td>--sentence-class [<span style="text-transform: uppercase">sentence-class</span>]</td>
<td>Sentence class (default: <span class="synopsis-option-default"><code></code></span>)</td>
</tr>
<tr>
<td>--lexicon [<span style="text-transform: uppercase">lexicon</span>]</td>
<td>Lexicons (default: <span class="synopsis-option-default"><code>p:system-property('d:org.daisy.pipeline.tts.default-lexicon')</code></span>)</td>
</tr>
<tr>
<td>--apply-document-specific-stylesheets [<span style="text-transform: uppercase">apply-document-specific-stylesheets</span>]</td>
<td>Apply author CSS style sheets (default: <span class="synopsis-option-default"><code>false</code></span>)</td>
</tr>
<tr>
<td>--ensure-pagenum-text [<span style="text-transform: uppercase">ensure-pagenum-text</span>]</td>
<td>Ensure text content for page numbers (default: <span class="synopsis-option-default"><code>false</code></span>)</td>
</tr>
<tr>
<td>--ensure-section-headings [<span style="text-transform: uppercase">ensure-section-headings</span>]</td>
<td>Ensure headings for all sections (default: <span class="synopsis-option-default"><code>false</code></span>)</td>
</tr>
<tr>
<td>--stylesheet-parameters [<span style="text-transform: uppercase">stylesheet-parameters</span>]</td>
<td>Style sheet parameters (default: <span class="synopsis-option-default"><code>()</code></span>)</td>
</tr>
<tr>
<td>--braille-translator [<span style="text-transform: uppercase">braille-translator</span>]</td>
<td>Braille translator query (default: <span class="synopsis-option-default"><code>(translator:liblouis)</code></span>)</td>
</tr>
<tr>
<td>--set-default-rendition-to-braille [<span style="text-transform: uppercase">set-default-rendition-to-braille</span>]</td>
<td>Set default rendition to braille. (default: <span class="synopsis-option-default"><code>false</code></span>)</td>
</tr>
<tr>
<td>--audio [<span style="text-transform: uppercase">audio</span>]</td>
<td>Perform text-to-speech (default: <span class="synopsis-option-default"><code>default</code></span>)</td>
</tr>
<tr>
<td>--stylesheet [<span style="text-transform: uppercase">stylesheet</span>]</td>
<td>Style sheets (default: <span class="synopsis-option-default"><code></code></span>)</td>
</tr>
<tr>
<td>--include-tts-log [<span style="text-transform: uppercase">include-tts-log</span>]</td>
<td>Enable TTS log (default: <span class="synopsis-option-default"><code>p:system-property('d:org.daisy.pipeline.tts.log')</code></span>)</td>
</tr>
<tr>
<td>--braille [<span style="text-transform: uppercase">braille</span>]</td>
<td>Translate to braille (default: <span class="synopsis-option-default"><code>false</code></span>)</td>
</tr>
<tr>
<td>-o,--output [OUTPUT]</td>
<td>Path where to store the results. This option is mandatory when the job is not executed in the background</td>
</tr>
<tr>
<td>-z,--zip</td>
<td>Write the output to a zip file rather than to a folder</td>
</tr>
<tr>
<td>-n,--nicename [NICENAME]</td>
<td>Set job's nice name</td>
</tr>
<tr>
<td>-r,--priority [PRIORITY]</td>
<td>Set job's priority (high|medium|low)</td>
</tr>
<tr>
<td>-q,--quiet</td>
<td>Do not print the job's messages</td>
</tr>
<tr>
<td>-p,--persistent</td>
<td>Delete the job after it is executed</td>
</tr>
<tr>
<td>-b,--background</td>
<td>Sends the job and exits</td>
</tr>
</table>
</div>
<script type="text/javascript">
var guiSynopsis = document.getElementsByClassName('gui-synopsis')[0];
var cliSynopsis = document.getElementsByClassName('cli-synopsis')[0];
function switchToCliView() {
guiSynopsis.classList.add('hidden');
cliSynopsis.classList.remove('hidden');
}
function switchToGuiView() {
guiSynopsis.classList.remove('hidden');
cliSynopsis.classList.add('hidden');
}
var loaded = false;
var onload = function() {
if (loaded)
return;
var button = document.createElement('span');
button.setAttribute('role', 'link');
button.setAttribute('tabindex', '0');
button.className = 'toggle-synopsis-button';
button.addEventListener('click', switchToCliView);
button.addEventListener('keyup', function(event) {
if (event.keyCode == 13) {
event.preventDefault();
switchToCliView();
}
});
guiSynopsis.insertBefore(button, guiSynopsis.firstChild);
button = document.createElement('span');
button.setAttribute('role', 'link');
button.setAttribute('tabindex', '0');
button.className = 'toggle-synopsis-button';
button.addEventListener('click', switchToGuiView);
button.addEventListener('keyup', function(event) {
if (event.keyCode == 13) {
event.preventDefault();
switchToGuiView();
}
});
cliSynopsis.insertBefore(button, cliSynopsis.firstChild);
loaded = true;
}
if (window.addEventListener) {
window.addEventListener('load', onload);
} else {
window.attachEvent('onload', onload);
}
</script>