summaryrefslogtreecommitdiff
path: root/ext/bg/settings.html
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/settings.html')
-rw-r--r--ext/bg/settings.html63
1 files changed, 43 insertions, 20 deletions
diff --git a/ext/bg/settings.html b/ext/bg/settings.html
index 0bc5e14c..e4710283 100644
--- a/ext/bg/settings.html
+++ b/ext/bg/settings.html
@@ -14,7 +14,7 @@
<h1>Yomichan Options</h1>
</div>
- <div class="profile-form">
+ <div class="profile-form ignore-form-changes">
<h3>Profiles</h3>
<p class="help-block">
@@ -141,10 +141,6 @@
</div>
<div class="checkbox">
- <label><input type="checkbox" id="auto-play-audio"> Play audio automatically</label>
- </div>
-
- <div class="checkbox">
<label><input type="checkbox" id="show-advanced-options"> Show advanced options</label>
</div>
@@ -162,16 +158,6 @@
</div>
<div class="form-group">
- <label for="audio-playback-source">Audio playback source</label>
- <select class="form-control" id="audio-playback-source">
- <option value="disabled">Disabled</option>
- <option value="jpod101">JapanesePod101</option>
- <option value="jpod101-alternate">JapanesePod101 (alternate)</option>
- <option value="jisho">Jisho.org</option>
- </select>
- </div>
-
- <div class="form-group">
<label for="popup-display-mode">Popup display mode</label>
<select class="form-control" id="popup-display-mode">
<option value="default">Default</option>
@@ -180,11 +166,6 @@
</div>
<div class="form-group options-advanced">
- <label for="audio-playback-volume">Audio playback volume <span class="label-light">(percent)</span></label>
- <input type="number" min="0" max="100" id="audio-playback-volume" class="form-control">
- </div>
-
- <div class="form-group options-advanced">
<label for="max-displayed-results">Maximum displayed results</label>
<input type="number" min="1" id="max-displayed-results" class="form-control">
</div>
@@ -257,6 +238,47 @@
</div>
<div>
+ <h3>Audio Options</h3>
+
+ <div class="checkbox">
+ <label><input type="checkbox" id="audio-playback-enabled"> Enable audio playback in search results</label>
+ </div>
+
+ <div class="checkbox">
+ <label><input type="checkbox" id="auto-play-audio"> Play audio automatically</label>
+ </div>
+
+ <div class="form-group">
+ <label for="audio-playback-volume">Audio playback volume <span class="label-light">(percent)</span></label>
+ <input type="number" min="0" max="100" id="audio-playback-volume" class="form-control">
+ </div>
+
+ <div class="form-group options-advanced">
+ <label for="audio-custom-source">Custom audio source <span class="label-light">(URL)</span></label>
+ <input type="text" id="audio-custom-source" class="form-control" placeholder="Example: http://localhost/audio.mp3?expression={expression}&reading={reading}">
+ </div>
+
+ <div class="form-group ignore-form-changes">
+ <label>Audio playback sources</label>
+ <div class="audio-source-list"></div>
+ <div class="input-group audio-source-options">
+ <button class="btn btn-default audio-source-add" title="Add audio playback source"><span class="glyphicon glyphicon-plus"></span></button>
+ </div>
+
+ <template id="audio-source-template"><div class="input-group audio-source">
+ <div class="input-group-addon audio-source-prefix"></div>
+ <select class="form-control audio-source-select">
+ <option value="jpod101">JapanesePod101</option>
+ <option value="jpod101-alternate">JapanesePod101 (alternate)</option>
+ <option value="jisho">Jisho.org</option>
+ <option value="custom">Custom</option>
+ </select>
+ <div class="input-group-btn"><button class="btn btn-danger audio-source-remove" title="Remove"><span class="glyphicon glyphicon-remove"></span></button></div>
+ </div></template>
+ </div>
+ </div>
+
+ <div>
<h3>Scanning Options</h3>
<div class="checkbox">
@@ -574,6 +596,7 @@
<script src="/bg/js/anki.js"></script>
<script src="/bg/js/api.js"></script>
+ <script src="/bg/js/audio-ui.js"></script>
<script src="/bg/js/conditions.js"></script>
<script src="/bg/js/conditions-ui.js"></script>
<script src="/bg/js/dictionary.js"></script>