usage guide
This commit is contained in:
parent
a551b0d462
commit
d263a93d44
@ -9,28 +9,24 @@
|
|||||||
<body>
|
<body>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<h1>Welcome to Yomichan!</h1>
|
<h1>Yomichan Usage Guide</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p>Thank you for downloading this extension! I hope that Yomichan will help you on your language learning journey.</p>
|
<p>
|
||||||
|
Read the steps below to get up and running with Yomichan. For complete documentation,
|
||||||
|
visit the <a href="https://foosoft.net/projects/yomichan/" target="_blank">official homepage</a>.
|
||||||
|
</p>
|
||||||
|
|
||||||
<div>
|
<ol>
|
||||||
<h2>Quick Guide</h2>
|
<li>Click on the <img src="/mixed/img/icon16.png" alt> icon in the browser toolbar to open the Yomichan actions dialog.</li>
|
||||||
|
<li>Click on the <em>monkey wrench</em> icon in the middle to open the options page.</li>
|
||||||
|
<li>Import the dictionaries you wish to use for term and Kanji searches.</li>
|
||||||
|
<li>Hold down <kbd>Shift</kbd> key or the middle mouse button as you move your mouse over text to display definitions.</li>
|
||||||
|
<li>Click on the <img src="/mixed/img/play-audio.png" alt> icon to hear the term pronounced by a native speaker.</li>
|
||||||
|
<li>Click on individual Kanji in the term definition results to view additional information about those characters.</li>
|
||||||
|
</ol>
|
||||||
|
|
||||||
<p>
|
<p>This startup notification can be turned off on the Yomichan options page.</p>
|
||||||
Read the steps below to get up and running with Yomichan. For complete documentation,
|
|
||||||
visit the <a href="https://foosoft.net/projects/yomichan/" target="_blank">official homepage</a>.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<ol>
|
|
||||||
<li>Click on the <img src="/mixed/img/icon16.png" alt> icon in the browser toolbar to open the Yomichan actions dialog.</li>
|
|
||||||
<li>Click on the <em>monkey wrench</em> icon in the middle to open the options page.</li>
|
|
||||||
<li>Import the dictionaries you wish to use for term and Kanji searches.</li>
|
|
||||||
<li>Hold down <kbd>Shift</kbd> key or the middle mouse button as you move your mouse over text to display definitions.</li>
|
|
||||||
<li>Click on the <img src="/mixed/img/play-audio.png" alt> icon to hear the term pronounced by a native speaker.</li>
|
|
||||||
<li>Click on individual Kanji in the term definition results to view additional information about those characters.</li>
|
|
||||||
</ol>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -25,6 +25,7 @@ function formRead() {
|
|||||||
return optionsLoad().then(optionsOld => {
|
return optionsLoad().then(optionsOld => {
|
||||||
const optionsNew = $.extend(true, {}, optionsOld);
|
const optionsNew = $.extend(true, {}, optionsOld);
|
||||||
|
|
||||||
|
optionsNew.general.showGuide = $('#show-usage-guide').prop('checked');
|
||||||
optionsNew.general.audioSource = $('#audio-playback-source').val();
|
optionsNew.general.audioSource = $('#audio-playback-source').val();
|
||||||
optionsNew.general.audioVolume = $('#audio-playback-volume').val();
|
optionsNew.general.audioVolume = $('#audio-playback-volume').val();
|
||||||
optionsNew.general.groupResults = $('#group-terms-results').prop('checked');
|
optionsNew.general.groupResults = $('#group-terms-results').prop('checked');
|
||||||
@ -111,6 +112,7 @@ $(document).ready(() => {
|
|||||||
handlebarsRegister();
|
handlebarsRegister();
|
||||||
|
|
||||||
optionsLoad().then(options => {
|
optionsLoad().then(options => {
|
||||||
|
$('#show-usage-guide').prop('checked', options.general.showGuide);
|
||||||
$('#audio-playback-source').val(options.general.audioSource);
|
$('#audio-playback-source').val(options.general.audioSource);
|
||||||
$('#audio-playback-volume').val(options.general.audioVolume);
|
$('#audio-playback-volume').val(options.general.audioVolume);
|
||||||
$('#group-terms-results').prop('checked', options.general.groupResults);
|
$('#group-terms-results').prop('checked', options.general.groupResults);
|
||||||
|
@ -89,7 +89,8 @@ function optionsSetDefaults(options) {
|
|||||||
showAdvanced: false,
|
showAdvanced: false,
|
||||||
popupWidth: 400,
|
popupWidth: 400,
|
||||||
popupHeight: 250,
|
popupHeight: 250,
|
||||||
popupOffset: 10
|
popupOffset: 10,
|
||||||
|
showGuide: true
|
||||||
},
|
},
|
||||||
|
|
||||||
scanning: {
|
scanning: {
|
||||||
@ -144,6 +145,9 @@ function optionsVersion(options) {
|
|||||||
} else {
|
} else {
|
||||||
options.general.audioSource = 'disabled';
|
options.general.audioSource = 'disabled';
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
() => {
|
||||||
|
options.general.showGuide = false;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -28,8 +28,8 @@ window.yomichan = new class {
|
|||||||
this.translator.prepare().then(optionsLoad).then(this.optionsSet.bind(this)).then(() => {
|
this.translator.prepare().then(optionsLoad).then(this.optionsSet.bind(this)).then(() => {
|
||||||
chrome.commands.onCommand.addListener(this.onCommand.bind(this));
|
chrome.commands.onCommand.addListener(this.onCommand.bind(this));
|
||||||
chrome.runtime.onMessage.addListener(this.onMessage.bind(this));
|
chrome.runtime.onMessage.addListener(this.onMessage.bind(this));
|
||||||
if (chrome.runtime.onInstalled) {
|
if (this.options.general.showGuide) {
|
||||||
chrome.runtime.onInstalled.addListener(this.onInstalled.bind(this));
|
chrome.tabs.create({url: chrome.extension.getURL('/bg/guide.html')});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -157,12 +157,6 @@ window.yomichan = new class {
|
|||||||
return Promise.resolve(handlebarsRender(template, data));
|
return Promise.resolve(handlebarsRender(template, data));
|
||||||
}
|
}
|
||||||
|
|
||||||
onInstalled(details) {
|
|
||||||
if (details.reason === 'install') {
|
|
||||||
chrome.tabs.create({url: chrome.extension.getURL('/bg/guide.html')});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
onCommand(command) {
|
onCommand(command) {
|
||||||
const handlers = {
|
const handlers = {
|
||||||
search: () => {
|
search: () => {
|
||||||
|
@ -25,6 +25,10 @@
|
|||||||
<div>
|
<div>
|
||||||
<h3>General Options</h3>
|
<h3>General Options</h3>
|
||||||
|
|
||||||
|
<div class="checkbox">
|
||||||
|
<label><input type="checkbox" id="show-usage-guide"> Show usage guide on startup</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="checkbox">
|
<div class="checkbox">
|
||||||
<label><input type="checkbox" id="group-terms-results"> Group term results</label>
|
<label><input type="checkbox" id="group-terms-results"> Group term results</label>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user